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 pitrou
Recipients chrism, ncoghlan, pitrou
Date 2013-11-30.11:07:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385809676.22.0.895252841662.issue19837@psf.upfronthosting.co.za>
In-reply-to
Content
Still, JSON itself is not a wire protocol; HTTP is. http://www.json.org states that "JSON is a text format" and the grammar description talks "UNICODE characters", not bytes. The ECMA spec states that "JSON text is a sequence of Unicode code points".

RFC 4627 is a bit more affirmative, though, and says that "JSON text SHALL be encoded in Unicode [sic]. The default encoding is UTF-8".

Related issues:
- issue #10976: json.loads() raises TypeError on bytes object
- issue #17909 (+ patch!): autodetecting JSON encoding

> The other simple solution would be to add <name>b variants of the affected APIs.

"dumpb" is not very pretty and can easily be misread as "dumb" :-)
"dump_bytes" looks better to me.
History
Date User Action Args
2013-11-30 11:07:56pitrousetrecipients: + pitrou, chrism, ncoghlan
2013-11-30 11:07:56pitrousetmessageid: <1385809676.22.0.895252841662.issue19837@psf.upfronthosting.co.za>
2013-11-30 11:07:56pitroulinkissue19837 messages
2013-11-30 11:07:55pitroucreate