classification
Title: json.tool does not accept an --indent flag
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
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 2017-06-15 05:25 by serhiy.storchaka. 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
History
Date User Action Args
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