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.

Title: json.tool does not accept an --indent flag
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
Status: closed Resolution: duplicate
Dependencies: Superseder: Specifying indent in the json.tool command
View: 29636
Assigned To: Nosy List: eartheaterrr, martin.panter, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-06-15 01:38 by eartheaterrr, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2207 closed eartheaterrr, 2017-06-15 01:38
Messages (2)
msg296055 - (view) Author: eartheaterrr (eartheaterrr) * Date: 2017-06-15 01:38
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 filing this issue to propose this change.
msg296060 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2017-06-15 03:06
Issue 29636 looks related
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74854
2017-06-15 05:25:49serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
resolution: duplicate
superseder: Specifying indent in the json.tool command
stage: resolved
2017-06-15 03:06:29martin.pantersetnosy: + martin.panter
messages: + msg296060
2017-06-15 01:38:17eartheaterrrcreate