diff options
author | HongWeipeng <961365124@qq.com> | 2018-11-07 10:09:32 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-07 10:09:32 (GMT) |
commit | f19447994983902aa88362d8fffe645f1ea2f2aa (patch) | |
tree | 28d11d764423c8838132f9f61f20fced054ddf6b /Doc | |
parent | 0e7497cb469b003a45a4abe4105b81ef6d0c4002 (diff) | |
download | cpython-f19447994983902aa88362d8fffe645f1ea2f2aa.zip cpython-f19447994983902aa88362d8fffe645f1ea2f2aa.tar.gz cpython-f19447994983902aa88362d8fffe645f1ea2f2aa.tar.bz2 |
bpo-31553: add --json-lines option to json.tool (#10051)
* add jsonlines option to json.tool
* code review
* fix:avoid read infile after it close
* improve doc in whatsnew 3.8
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/json.rst | 6 | ||||
-rw-r--r-- | Doc/whatsnew/3.8.rst | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 510e307..589e86c 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -717,6 +717,12 @@ Command line options .. versionadded:: 3.5 +.. cmdoption:: --json-lines + + Parse every input line as separate JSON object. + + .. versionadded:: 3.8 + .. cmdoption:: -h, --help Show the help message. diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 51aee1b..3bacbab 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -151,6 +151,12 @@ by right-clicking the button. (Contributed by Tal Einat in :issue:`1529353`.) The changes above have been backported to 3.7 maintenance releases. +json.tool +--------- + +Add option ``--json-lines`` to parse every input line as separate JSON object. +(Contributed by Weipeng Hong in :issue:`31553`.) + os.path ------- |