Message204799
| 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: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 |
|