RFC 7464 has a different format (0x1E at beginning of every record) and a
different media type (application/json-seq vs application/x-ldjson) than
line delimited JSON (https://en.wikipedia.org/wiki/Line_Delimited_JSON).
The 0x1E at the beginning of every record makes it hard to edit these
files.

Not sure it will improve interoperability, rather fragment things because
it is likely that most people will stick to ldjson.

2015-08-04 1:29 GMT+02:00 Carsten Bormann <c...@tzi.org>:

> Hi Domenic,
>
> We have a spec for that: RFC 7464
>
> Grüße, Carsten
>
> On 03 Aug 2015 20:22, Domenic Denicola wrote:
>
> My understanding of most "streaming JSON" use in Node.js is that it
> actually is "newline-delimited JSON." That is, each line is parsed,
> delivered, and processed as a single chunk containing a JSON value, and the
> streaming nature comes from the incremental processing and backpressure as
> applied in between newline-delimited chunks.
>
> Part of the advantage of this is that it's extremely easy to specify and
> implement how it works.
>
> Bruno seems to indicate he's run in to use cases where it'd be useful to
> process a normal JSON object in a streaming fashion. That seems like a
> harder problem, indeed necessitating a SAX-like API.
>
> -----Original Message-----
> From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of
> Brendan Eich
> Sent: Sunday, August 2, 2015 21:26
> To: Bruno Jouhier
> Cc: es-discuss
> Subject: Re: Please help with writing spec for async JSON APIs
>
> Exactly! Incremental and async, i.e., streaming.
>
> XML quickly needed such APIs
> (https://en.wikipedia.org/wiki/Simple_API_for_XML,
> https://en.wikipedia.org/wiki/StAX). JSON's in the same boat.
>
> /be
>
> Bruno Jouhier wrote:
>
> A common use case is large JSON feeds: header + lots of entries +
> trailer
>
> When processing such feeds, you should not bring the whole JSON in
> memory all at once. Instead you should process the feed incrementally.
>
> So, IMO, an alternate API should not be just asynchronous, it should
> also be incremental.
>
> FWIW, I have implemented an incremental/evented parser for V8 with a
> simple API. This parser is incremental but not async (because V8
> imposes that materialization happen in the main JS thread). But, if
> the V8 restriction could be lifted, it could be made async with the
> same API. See https://github.com/bjouhier/i-json
>
> i-json's API is a simple low level API. A more sophisticated solution
> would be a duplex stream.
>
> There was also a long discussion on this topic on node's GitHub:
> https://github.com/joyent/node/issues/7543
>
> Bruno
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to