[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f19447994983902aa88362d8fffe645f1ea2f2aa by Serhiy Storchaka (HongWeipeng) in branch 'master': bpo-31553: add --json-lines option to json.tool (#10051) https://github.com/python/cpython/commit/f19447994983902aa88362d8fffe645f1ea2f2aa

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-10-24 Thread STINNER Victor
STINNER Victor added the comment: > The output is not a valid JSON format, and is not a valid JSON Lines format. > What you are going to do with it? It looks useful to me to read a nicely indented JSON in the terminal (without specifying an output file). It's more readable that compact JSON

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The output is not a valid JSON format, and is not a valid JSON Lines format. What you are going to do with it? -- ___ Python tracker ___

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-10-23 Thread hongweipeng
Change by hongweipeng : -- pull_requests: +9389 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-10-01 Thread Jeffrey Rackauckas
Change by Jeffrey Rackauckas : -- keywords: +patch pull_requests: +3828 stage: -> patch review ___ Python tracker ___

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-25 Thread Eric Moyer
Eric Moyer added the comment: I planned to write the PR myself, on the principle of "it's my itch, I should scratch it." But if you think it is better for someone else to write it, you know the codebase better than I, and you know how long a PR takes to review/fix. My intention is to help. I'll

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Eric, did you want to write the PR yourself or would you like for Lisa to bring it to fruition? If you're going to do it yourself, Lisa will serve as the primary reviewer (with either Ezio or me doing the final sign-off). -- assignee: ->

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-23 Thread Ezio Melotti
Ezio Melotti added the comment: I agree with Raymond that this is a reasonable request. Even if jsonlines is not part of the JSON specification, the format is quite common, and practicality beats purity (espcially considering that we are just talking about json.tool). -- nosy:

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Jsonlines is an external to JSON format. You should split the data on lines and pass every line to the JSON parser separately. The same you should do with json.tool. $ echo -e '{"ingredients":["frog", "water", "chocolate",

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems like a reasonable enhancement. -- nosy: +rhettinger ___ Python tracker ___

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-22 Thread Eric Moyer
New submission from Eric Moyer: json.tool should have the ability to format jsonlines data. It is a very commonly used format in many industries. Right now when given jsonlines (for example): echo -e '{"ingredients":["frog", "water", "chocolate", "glucose"]} | python -m json.tool Works.