bpo-29636: Add --indent / --no-indent arguments to json.tool#345
Conversation
|
Note to rebase on #346 which should be merged first. |
Sorry, something went wrong.
|
Spaces after comma and semicolon are not just for readability. They make JSON compatible with YAML 1.0. |
Sorry, something went wrong.
|
Yes, it is. --indent=0 adds new lines, --no-indent writes all in one line.
"write all in one line": it sounds like the use case is to produce
smaller file, so it seems redundant and less efficient than --compact.
I expect that --compact removes all spaces and newlines to produce the
smallest file.
|
Sorry, something went wrong.
|
This is not the right place for the design discussion. Lets continue it on the bug tracker. |
Sorry, something went wrong.
@serhiy-storchaka and @Haypo I updated bpo-29636 with a summary of the design discussion thus far. I propose continuing this pull request with only |
Sorry, something went wrong.
|
#346 has been merged and this PR rebased. @serhiy-storchaka, @berkerpeksag, @methane and @Haypo: open for review. No more outstanding changes on my end. |
Sorry, something went wrong.
b53a918 to
56a3851
Compare
April 13, 2017 18:58
Originall from python#2720 Set default option for infile and outfile as per python#2720 (review) Use --sort-keys help message based on the json.tool docs at https://docs.python.org/3.6/library/json.html#basic-usage: Remove commens as per https://bugs.python.org/msg298692. Code was descriptive without the comments.
From python#201 which is being split into two pull requests. See http://bugs.python.org/issue29636
|
Thanks @methane for ba16891 which merges in the changes from #5315 (dict order guaranteed as of Python 3.7). I'll get working on the NEWS entry. |
Sorry, something went wrong.
Use `blurb add` command to assist with adding the NEWS entry.
|
Ready from my end. As of b8fee34, |
Sorry, something went wrong.
|
What if pass conflicting options? |
Sorry, something went wrong.
The intention is to disallow users from passing multiple whitespace options with argparse's For example,
|
Sorry, something went wrong.
|
I hope this feature can be merged ASAP, it's really helpful as a cross-platform command line utility. |
Sorry, something went wrong.
@mya12321 the most effective way for you to support this PR would be to chime in on the issue. At present, I think there is some hesitancy to add additional arguments, so if you explain your use case that may be helpful. But as far as I understand, this discussion should go on the bug tracker and not on GitHub. |
Sorry, something went wrong.
|
Would you resolve the conflict? |
Sorry, something went wrong.
Bumps [gidgethub](https://github.com/brettcannon/gidgethub) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/brettcannon/gidgethub/releases) - [Changelog](https://github.com/brettcannon/gidgethub/blob/master/docs/changelog.rst) - [Commits](gidgethub/gidgethub@v4.1.0...v4.1.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
From #201 which is being split into two pull requests.
Tagging @serhiy-storchaka, @berkerpeksag, @methane who helped review #201.
Closes http://bugs.python.org/issue29636.
https://bugs.python.org/issue29636