[docs] [issue10976] json.loads() throws TypeError on bytes object

Serhiy Storchaka report at bugs.python.org
Thu Apr 26 16:07:46 CEST 2012


Serhiy Storchaka <storchaka at gmail.com> added the comment:

Things are a little more complicated. '123' is not a valid JSON according to RFC 4627 (the top-level element can only be an object or an array). This means that the autodetection algorithm will not always work for such non-standard data.

If we can parse binary data, then there must be a way to generate binary data in at least one of the Unicode encodings.

By the way, the documentation should give a link to RFC 4627 and explain the current implementation is different from it.

----------

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


More information about the docs mailing list