[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: See also #11489. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wonder if json should simply be less strict by default. If you pass the raw unescaped character, the json module accepts it: >>> json.loads('{"a": "\ud8e9"}') {'a': '\ud8e9'} It's only if you pass the escaped representation that json rejects it: >>> json.lo

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Inspired by simplejson issue [1] which is related to standard json module too. JSON parser 3.3+ and wide builds of 3.2- raise an error on invalid strings (i.e. with unpaired surrogate), while narrow builds and some third-party parsers. Wide builds are righ