Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(124377)

Unified Diff: Lib/json/tool.py

Issue 16333: Trailing whitespace in json dump when using indent
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Doc/library/json.rst ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/json/tool.py Wed Nov 28 02:47:45 2012 -0800
+++ b/Lib/json/tool.py Wed Nov 28 17:59:08 2012 +0200
@@ -29,7 +29,7 @@
obj = json.load(infile)
except ValueError as e:
raise SystemExit(e)
- json.dump(obj, outfile, sort_keys=True, indent=4)
+ json.dump(obj, outfile, sort_keys=True, indent=4, separators=(',', ': '))
outfile.write('\n')
« no previous file with comments | « Doc/library/json.rst ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+