[issue18290] json encoder does not support JSONP/JavaScript safe escaping

Tom Christie report at bugs.python.org
Tue Dec 2 16:32:10 CET 2014


Tom Christie added the comment:

> There is explicit note in the documentation about incompatibility with JavaScript.

That may be, but we're still unnecessarily making for a poorer user experience. There's no good reason why we shouldn't just treat \u2028 and \u2029 as control characters - it's only going to making things better for developers using the json module. It is an unnecessary usability bug as it stands.

Just because JSON has a bug in its spec wrt those two characters, doesn't mean we can't help our users avoid ever having to know about that or work around it in user code.

----------

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


More information about the Python-bugs-list mailing list