Re: Dropping bytes "support" in json

[email protected]
Newsgroups gmane.comp.python.devel,gmane.comp.python.mime.devel
Message-ID <20090410052836.12555.1364055898.divmod.xquotient.7734@weber.divmod.com>
On 03:21 am, [email protected] 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.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-python-dev%40m.gmane.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.