Message204799
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. |
|
Date |
User |
Action |
Args |
2013-11-30 11:07:56 | pitrou | set | recipients:
+ pitrou, chrism, ncoghlan |
2013-11-30 11:07:56 | pitrou | set | messageid: <1385809676.22.0.895252841662.issue19837@psf.upfronthosting.co.za> |
2013-11-30 11:07:56 | pitrou | link | issue19837 messages |
2013-11-30 11:07:55 | pitrou | create | |
|