A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-April/088582.html below:

[Python-Dev] Dropping bytes "support" in json

[Python-Dev] Dropping bytes "support" in json [Python-Dev] Dropping bytes "support" in jsonglyph at divmod.com glyph at divmod.com
Fri Apr 10 07:28:36 CEST 2009
On 03:21 am, ncoghlan at gmail.com wrote:
>Barry Warsaw wrote:

>>I don't know whether the parameter thing will work or not, but you're
>>probably right that we need to get the bytes-everywhere API first.

>Given that json is a wire protocol, that sounds like the right approach
>for json as well. Once bytes-everywhere works, then a text API can be
>built on top of it, but it is difficult to build a bytes API on top of 
>a
>text one.

I wish I could agree, but JSON isn't really a wire protocol.  According 
to http://www.ietf.org/rfc/rfc4627.txt JSON is "a text format for the 
serialization of structured data".  There are some notes about encoding, 
but it is very clearly described in terms of unicode code points.
>So I guess the IO library *is* the right model: bytes at the bottom of
>the stack, with text as a wrapper around it (mediated by codecs).

In email's case this is true, but in JSON's case it's not.  JSON is a 
format defined as a sequence of code points; MIME is defined as a 
sequence of octets.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4