Commit def6ee59 authored by Ezio Melotti's avatar Ezio Melotti

#16476: Fix json.tool to avoid including trailing whitespace.

parent d8feba90
......@@ -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
}
]
......
......@@ -31,7 +31,8 @@ def main():
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')
......
......@@ -154,6 +154,8 @@ Core and Builtins
Library
-------
- Issue #16476: Fix json.tool to avoid including trailing whitespace.
- Issue #1160: Fix compiling large regular expressions on UCS2 builds.
Patch by Serhiy Storchaka.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment