diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/json/tool.py | 3 | ||||
-rw-r--r-- | Lib/test/json_tests/test_tool.py | 16 |
2 files changed, 10 insertions, 9 deletions
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 @@ 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') diff --git a/Lib/test/json_tests/test_tool.py b/Lib/test/json_tests/test_tool.py index 8a3cc6f..1f2c8a2 100644 --- a/Lib/test/json_tests/test_tool.py +++ b/Lib/test/json_tests/test_tool.py @@ -19,19 +19,19 @@ class TestTool(unittest.TestCase): [ [ "blorpie" - ], + ], [ "whoops" - ], - [], - "d-shtaeou", - "d-nthiouh", - "i-vhbjkhnth", + ], + [], + "d-shtaeou", + "d-nthiouh", + "i-vhbjkhnth", { "nifty": 87 - }, + }, { - "field": "yes", + "field": "yes", "morefield": false } ] |