[issue29540] Add compact=True flag to json.dump/dumps

Berker Peksag report at bugs.python.org
Tue Feb 14 08:26:12 EST 2017


Berker Peksag added the comment:

I'm +1 on the idea. Currently, a user needs to find this information in a wall of text: "To get the most compact JSON representation, you should specify (',', ':') to eliminate whitespace." It's easy to miss the lack of trailing space in (',', ':').

Perhaps the constant name could be changed to something more descriptive, but I don't have a better suggestion at the moment.

(Adding Brett since he also reviewed the PR.)

----------
nosy: +berker.peksag, brett.cannon
stage:  -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29540>
_______________________________________


More information about the Python-bugs-list mailing list