#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')