bpo-30669: add --indent flag to json.tool by modulitos · Pull Request #2207 · python/cpython
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.tool or (:%! python -m json.tool in 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.tool is 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 :-)