diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-29 00:25:03 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-29 00:25:03 (GMT) |
commit | b32512ed9a1ab9912a9e0bdbb609ca1a19949355 (patch) | |
tree | 0a50a9693de2d3048a93189ac4d26b9f875ca0e4 /Lib/json | |
parent | 057bcb4c6c7eef93066002db7ab486f12d50ccee (diff) | |
download | cpython-b32512ed9a1ab9912a9e0bdbb609ca1a19949355.zip cpython-b32512ed9a1ab9912a9e0bdbb609ca1a19949355.tar.gz cpython-b32512ed9a1ab9912a9e0bdbb609ca1a19949355.tar.bz2 |
#16476: Fix json.tool to avoid including trailing whitespace.
Diffstat (limited to 'Lib/json')
-rw-r--r-- | Lib/json/tool.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/json/tool.py b/Lib/json/tool.py index 9ab6d65..0f108c6 100644 --- a/Lib/json/tool.py +++ b/Lib/json/tool.py @@ -31,7 +31,8 @@ def main(): except ValueError as e: raise SystemExit(e) with outfile: - json.dump(obj, outfile, sort_keys=True, indent=4) + json.dump(obj, outfile, sort_keys=True, + indent=4, separators=(',', ': ')) outfile.write('\n') |