Re: [XHR] responseType "json"

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 UTC