W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [XHR] responseType "json"

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 12 Dec 2011 13:39:04 +0200
Message-ID: <CAJQvAufsoyFWQud5bykjCL9EDhcHBj+zytdpYpKFqt8HRiBEWA@mail.gmail.com>
To: public-webapps@w3.org
On Sun, Dec 11, 2011 at 4:08 PM, Jarred Nicholls <jarred@sencha.com> wrote:
>  A good compromise would be to only throw it away (and thus restrict
> responseText access) upon the first successful parse when accessing
> .response.

I disagree. Even though conceptually, the spec says that you first
accumulate text and then you invoke JSON.parse, I think we should
allow for implementations that feed an incremental JSON parser as data
arrives from the network and throws away each input buffer after
pushing it to the incremental JSON parser.

That is, in order to allow more memory-efficient implementations in
the future, I think we shouldn't expose responseText for JSON.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Monday, 12 December 2011 11:39:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:49 GMT