bpo-29636: json.tool: Add document for indentation options. by dhimmel · Pull Request #17482 · python/cpython
Conversation
#345 added indentation options for the json.tool command line utility. This PR follows up with some additional modifications that I didn't have time to put in the previous PR before it was merged.
https://bugs.python.org/issue29636
CC @methane
| Mutually exclusive options for whitespace control | ||
|
|
||
| .. versionadded:: 3.9 | ||
|
|
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wimglenn does this documentation look okay? I combined multiple arguments into a single line (not sure if that violates convention or is okay)
| parser.add_argument('--json-lines', action='store_true', default=False, | ||
| help='parse input using the jsonlines format') | ||
| help='parse input using the jsonlines format. ' | ||
| 'Use with --no-indent or --compact to produce valid jsonlines output.') |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hongweipeng (author of #10051): do you think this is a worthwhile and accurate addition to the documentation now that indentation options are supported?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
methane
changed the title
bpo-29636: touch ups to json.tool indentation options
bpo-29636: json.tool: Add document for indentation options.
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request
…-17482) And updated test to use subprocess.run