Author serhiy.storchaka
Recipients bob.ippolito, ezio.melotti, pitrou, rhettinger, serhiy.storchaka
Date 2013-05-04.14:38:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367678308.48.0.934181281887.issue17906@psf.upfronthosting.co.za>
In-reply-to
Content
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 right, such JSON data is invalid. However it will be good to be optionally more permissive to input data. Otherwise it is not easy process such invalid data.

I propose to add an "error" parameter to JSON decoder and encoder with the same meaning as in string decoding/encoding. "strict" is default and "surrogatepass" corresponds to narrow builds (and non-strict third-party parsers).

[1] https://github.com/simplejson/simplejson/issues/62
History
Date User Action Args
2013-05-04 14:38:28serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, bob.ippolito, pitrou, ezio.melotti
2013-05-04 14:38:28serhiy.storchakasetmessageid: <1367678308.48.0.934181281887.issue17906@psf.upfronthosting.co.za>
2013-05-04 14:38:28serhiy.storchakalinkissue17906 messages
2013-05-04 14:38:28serhiy.storchakacreate