FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-30669: add --indent flag to json.tool by modulitos · Pull Request #2207 · python/cpython · GitHub

/ cpython Public

bpo-30669: add --indent flag to json.tool - #2207

Closed
modulitos wants to merge 2 commits into
python:masterfrom
modulitos:json-tool-indent-flag
Closed

bpo-30669: add --indent flag to json.tool#2207
modulitos wants to merge 2 commits into
python:masterfrom
modulitos:json-tool-indent-flag

Conversation

modulitos commented Jun 15, 2017
edited
Loading

Copy link
Copy Markdown

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 :-)

Copy link
Copy Markdown

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!

modulitos changed the title add --indent flag to json.tool bpo-30669: add --indent flag to json.tool Jun 15, 2017

Copy link
Copy Markdown
Author

@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...

Copy link
Copy Markdown
Author

Looks like this feature is already in progress on http://bugs.python.org/issue29636, #426, and #345

modulitos closed this Jun 15, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL