This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dhimmel
Recipients bob.ippolito, dhimmel, ezio.melotti, methane, r.david.murray, rhettinger, serhiy.storchaka
Date 2017-04-13.19:13:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492110800.32.0.728212317132.issue29636@psf.upfronthosting.co.za>
In-reply-to
Content
@bob.ippolito thanks for pointing to jq as a reference implementation. I updated the pull request (https://git.io/vS9o8) to implement all of the relevant options. Currently, the PR supports the following mutually exclusive arguments:

--indent
--no-indent
--tab
--compact

These additions took 16 new lines of code in tool.py and 41 new lines of tests. However, I am happy to refactor the tests to be less repetitive if we choose to go forward with these changes.

@serhiy.storchaka I took a maximalist approach with respect to adding indentation options to GH #345. Although I know not all of the options may get merged, I thought we might as well work backwards.

However, the more I think about it, I do think every option above is a unique and valuable addition. I think that even with the changes, json.tool remains a lightweight wrapper json.load + json.dump.
History
Date User Action Args
2017-04-13 19:13:20dhimmelsetrecipients: + dhimmel, rhettinger, bob.ippolito, ezio.melotti, r.david.murray, methane, serhiy.storchaka
2017-04-13 19:13:20dhimmelsetmessageid: <1492110800.32.0.728212317132.issue29636@psf.upfronthosting.co.za>
2017-04-13 19:13:20dhimmellinkissue29636 messages
2017-04-13 19:13:19dhimmelcreate