From b32512ed9a1ab9912a9e0bdbb609ca1a19949355 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 29 Nov 2012 02:25:03 +0200 Subject: #16476: Fix json.tool to avoid including trailing whitespace. --- Lib/json/tool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/json/tool.py') diff --git a/Lib/json/tool.py b/Lib/json/tool.py index 9ab6d6546a..0f108c6dae 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') -- cgit v1.2.1