commit | b32512ed9a1ab9912a9e0bdbb609ca1a19949355 | [log] [tgz] |
---|---|---|
author | Ezio Melotti <ezio.melotti@gmail.com> | Thu Nov 29 02:25:03 2012 +0200 |
committer | Ezio Melotti <ezio.melotti@gmail.com> | Thu Nov 29 02:25:03 2012 +0200 |
tree | 0a50a9693de2d3048a93189ac4d26b9f875ca0e4 | |
parent | 057bcb4c6c7eef93066002db7ab486f12d50ccee [diff] |
#16476: Fix json.tool to avoid including trailing whitespace.
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 @@ 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')