[issue37982] Add a --minify argument to json.tool

Brad Solomon report at bugs.python.org
Thu Aug 29 15:52:06 EDT 2019


Brad Solomon <brad.solomon.1124 at gmail.com> added the comment:

Since, as you point out, json.tool is made for convenience, I see the reverse of pretty-printing (minifying) being just as convenient:

$ cat > expanded.json <<EOF
> {
>     "foo": "bar",
>     "json": "obj"
> }
> EOF
$ ./python.exe -m json.tool --minify expanded.json minf.json
$ cat minf.json 
{"foo":"bar","json":"obj"}

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37982>
_______________________________________


More information about the Python-bugs-list mailing list