commit | def6ee59793c7f43b9dcb0c635650b322834d445 | [log] [tgz] |
---|---|---|
author | Ezio Melotti <ezio.melotti@gmail.com> | Thu Nov 29 02:22:49 2012 +0200 |
committer | Ezio Melotti <ezio.melotti@gmail.com> | Thu Nov 29 02:22:49 2012 +0200 |
tree | e7ca47544f345a248634b88d95fa11b79f7c8769 | |
parent | d8feba904c5331f9f3f90899ff8d41b66468e069 [diff] [blame] |
#16476: Fix json.tool to avoid including trailing whitespace.
diff --git a/Lib/json/tool.py b/Lib/json/tool.py index 9ec3440..fe47c52 100644 --- a/Lib/json/tool.py +++ b/Lib/json/tool.py
@@ -31,7 +31,8 @@ except ValueError, 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')