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.

Author techtonik
Recipients eric.araujo, ezio.melotti, r.david.murray, serhiy.storchaka, techtonik, zach.mathew
Date 2012-11-24.23:12:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353798759.99.0.259062847659.issue16333@psf.upfronthosting.co.za>
In-reply-to
Content
Nice conflict case for explaining why perfect API is not here.

Because ', ' is now used as an item separator inline and separator for items that span multiple lines, we get trailing whitespace. If ',' is used, items will collide. To resolve this conflict democratically, a new option should be added, but..

If it is a JSON module then what separator are we talking about in the first place? It is not CSV, other separators are not in specification, so why is it there?

The only reason is to get the most compact representation. I doubt anybody uses any value except (',', ':'), so the `compact=True` should be sufficient.


As for this patch - there should be no doubt that it should be applied to all branches. The logic works only when indent is in force and that already breaks custom separators by inserting indents and newlines. Other argument that nobody will do JSON parsing with whitespace analysis, and even if they do - they'll still need to implement workaround for newlines.
History
Date User Action Args
2012-11-24 23:12:40techtoniksetrecipients: + techtonik, ezio.melotti, eric.araujo, r.david.murray, serhiy.storchaka, zach.mathew
2012-11-24 23:12:39techtoniksetmessageid: <1353798759.99.0.259062847659.issue16333@psf.upfronthosting.co.za>
2012-11-24 23:12:39techtoniklinkissue16333 messages
2012-11-24 23:12:39techtonikcreate