[issue29636] Specifying indent in the json.tool command

2019-12-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 15fb7fa88187f5841088721a43609bffe64a8dc7 by Inada Naoki (Daniel Himmelstein) in branch 'master': bpo-29636: json.tool: Add document for indentation options. (GH-17482)

[issue29636] Specifying indent in the json.tool command

2019-12-05 Thread Daniel Himmelstein
Change by Daniel Himmelstein : -- pull_requests: +16961 pull_request: https://github.com/python/cpython/pull/17482 ___ Python tracker ___

[issue29636] Specifying indent in the json.tool command

2019-12-03 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 ___ Python tracker ___

[issue29636] Specifying indent in the json.tool command

2019-12-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 03257949bc02a4afdf2ea1eb07a73f8128129579 by Inada Naoki (Daniel Himmelstein) in branch 'master': bpo-29636: Add --(no-)indent arguments to json.tool (GH-345) https://github.com/python/cpython/commit/03257949bc02a4afdf2ea1eb07a73f8128129579

[issue29636] Specifying indent in the json.tool command

2019-08-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > I don't think this PR should be merged. It adds too much options. [Daniel] > Since opening this issue, I've encountered several additional > instances where indentation control would have been nice. > I don't agree that jq is a sufficient

[issue29636] Specifying indent in the json.tool command

2019-07-30 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: Since opening this issue, I've encountered several additional instances where indentation control would have been nice. I don't agree that jq is a sufficient substitute: 1. jq is generally not pre-installed on systems. For projects where users are

[issue29636] Specifying indent in the json.tool command

2019-07-27 Thread Flavian Hautbois
Flavian Hautbois added the comment: So what do we do about this? Two possibilities: 1. We merge PR 9765 and close PRs 345 and 201, as 9765 seems more straighforward and was already approved. 9765 should be resubmitted to be merged since the base repo does not exist anymore, I could do

[issue29636] Specifying indent in the json.tool command

2018-10-08 Thread wim glenn
Change by wim glenn : -- keywords: +patch pull_requests: +9152 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue29636] Specifying indent in the json.tool command

2018-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think this PR should be merged. It adds too much options. I think that if one needs more control than the current json.tools command line interface gives, he should use the Python interface. Don't forget, that Python is

[issue29636] Specifying indent in the json.tool command

2018-02-22 Thread INADA Naoki
INADA Naoki added the comment: I'm OK to options in current pull request. And I think this bike-shedding discussion is not so important to pay our time and energy. Does anyone have strong opinion? If no, I'll merge the PR. --

[issue29636] Specifying indent in the json.tool command

2018-02-22 Thread INADA Naoki
Change by INADA Naoki : -- components: +Library (Lib) -IO versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue29636] Specifying indent in the json.tool command

2017-07-15 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: +2778 ___ Python tracker ___

[issue29636] Specifying indent in the json.tool command

2017-04-13 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: @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

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread Bob Ippolito
Bob Ippolito added the comment: Probably the best thing we could do here is to mirror the options available in similar tools, such as jq: https://stedolan.github.io/jq/manual/#Invokingjq The relevant options here would be: --indent --tab --compact-output --sort-keys The

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It's not just the support burden. It is also a burden of learning and remembering new API. The support burden itself is not tiny too. It includes careful designing, writing the implementation and test (the more options you have the more combinations you

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: @serhiy.storchaka I totally understand the desire to keep json.tool simple. However, given the description of json.tool in the documentation (below), I think an indentation option is within scope: > The json.tool module provides a simple command line

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread R. David Murray
R. David Murray added the comment: Easier, but if we do it in the tool, then it is done for everyone and they don't *each* have to spend that "less time" writing their own script. And --indent and --compact are both useful for debugging/hand testing, since it allows you to generate the input

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not particularly interested in this feature. Adding two or three options looks excessive. Python is a programming language and it is easy to write a simple script for your needs. Much easier than implement the general command line interface that

[issue29636] Specifying indent in the json.tool command

2017-03-03 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: To recap the discussion from https://git.io/vyCY8: there are three potential mutually exclusive command line options that have been suggested. There are as follows. ```python import json obj = [1, 2] print('--indent=4') print(json.dumps(obj, indent=4))

[issue29636] Specifying indent in the json.tool command

2017-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The discussion is scattered between different tracker issues and pull requests. Let continue it in one place. I don't think we should add too much options for controlling any little detail. json.tools is just small utility purposed mainly for debugging. If

[issue29636] Specifying indent in the json.tool command

2017-03-03 Thread Serhiy Int
Changes by Serhiy Int : -- pull_requests: +355 ___ Python tracker ___ ___

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Daniel Himmelstein added the comment: For discussion on how to implement this, see + https://github.com/python/cpython/pull/201#discussion_r102146742 + https://github.com/python/cpython/pull/201#discussion_r102840190 + https://github.com/python/cpython/pull/201#discussion_r102891428

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: -230 ___ Python tracker ___

[issue29636] Specifying indent in the json.tool command

2017-02-27 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: +298 ___ Python tracker ___

[issue29636] Specifying indent in the json.tool command

2017-02-23 Thread Daniel Himmelstein
New submission from Daniel Himmelstein: The utility of `python -m json.tool` would increase if users could specify the indent level. Example use case: newlines in a JSON document are important for readability and the ability to open in a text editor. However, if the file is large, you can