bpo-30669: add --indent flag to json.tool#2207
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
Sorry, something went wrong.
|
@the-knights-who-say-ni I have signed the CLA ~20 minutes ago - perhaps is just need some time to propagate? I have a confirmation email if that helps... |
Sorry, something went wrong.
|
Looks like this feature is already in progress on http://bugs.python.org/issue29636, #426, and #345 |
Sorry, something went wrong.
Resolves this issue: http://bugs.python.org/issue30669
I have been using the json.tool quite often by running
cat my-file.json | python -m json.toolor (:%! python -m json.toolin vim) to pretty print the json file, but I would like to customize the indentation level to 2 indentation spaces instead of default of 4. Unfortunately,json.toolis hard-coded to use 4 spaces for indentation, so I am submitting this PR to enable this ability.BTW: This is my first PR to cpython, so any suggestions or feedback on this PR would be great :-)