Re: [whatwg/fetch] Body.json reviver (#104)

I found this thread after attempts on stackoverflow. My #1 use of reviver is to reduce the size of the parsed object when working with very huge json files, eg:

    (k,v) => (k==="a" || k==="b")? v : undefined; // discarding c, d, ...

It should be done easily on a stream. It is a pity to have to pass through response.text(), or to use the entire object after response.json() before removing all the useless properties. I don't understand why it should be so difficult to implement.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/104#issuecomment-546690782

Received on Sunday, 27 October 2019 12:39:48 UTC