This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Trailing spaces in pretty-printed JSON
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder: Trailing whitespace in json dump when using indent
View: 16333
Assigned To: ezio.melotti Nosy List: ezio.melotti, leoliu, python-dev
Priority: normal Keywords:

Created on 2012-11-15 11:15 by leoliu, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg175607 - (view) Author: Leo Liu (leoliu) Date: 2012-11-15 11:15
python -mjson.tool some_file.json > x.json

x.json will have trailing white spaces.

Also reported here: http://thread.gmane.org/gmane.comp.python.devel/135311
msg175608 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-11-15 11:25
This is a duplicate of #16333.
msg176593 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-11-29 00:27
New changeset fa277ab588de by Ezio Melotti in branch '2.7':
#16476: Fix json.tool to avoid including trailing whitespace.
http://hg.python.org/cpython/rev/fa277ab588de

New changeset 6996a53f13ce by Ezio Melotti in branch '3.2':
#16476: Fix json.tool to avoid including trailing whitespace.
http://hg.python.org/cpython/rev/6996a53f13ce

New changeset 73a7e6ecd0e1 by Ezio Melotti in branch '3.3':
#16476: merge with 3.2.
http://hg.python.org/cpython/rev/73a7e6ecd0e1

New changeset c062ef6e4c3e by Ezio Melotti in branch 'default':
#16476: null merge with 3.3.
http://hg.python.org/cpython/rev/c062ef6e4c3e
msg176595 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-11-29 00:30
I fixed this separately from #16333.
In the "default" branch this got fixed by #16333 already.
Thanks for the report!
History
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60680
2012-11-29 00:35:48ezio.melottisetstatus: open -> closed
2012-11-29 00:30:27ezio.melottisetversions: + Python 3.2, Python 3.3, Python 3.4
messages: + msg176595

assignee: ezio.melotti
components: + Library (Lib)
resolution: duplicate -> fixed
2012-11-29 00:27:46python-devsetnosy: + python-dev
messages: + msg176593
2012-11-29 00:12:19ezio.melottisetstatus: closed -> open
2012-11-15 11:25:35ezio.melottisetstatus: open -> closed

superseder: Trailing whitespace in json dump when using indent

nosy: + ezio.melotti
messages: + msg175608
resolution: duplicate
stage: resolved
2012-11-15 11:15:36leoliucreate