For those interested in seeing potential new JSON standards, there is JSON-B, JSON-C and JSON-D
http://tools.ietf.org/html/draft-hallambaker-jsonbcd-00 That may be an appropriate WG for standardizing streaming of JSON objects FWIW: In the past, I also used newlines to move mulitple JSON objects and allows the use of readline libraries to read in an object at a time. It worked pretty well -- Dick On Tue, Jun 11, 2013 at 10:10 AM, Shane Holloway (IEEE) < [email protected]> wrote: > That makes sense. > > I get that it's a lot simpler to implement, but I'm often in a position > where I need a full-blown transfer protocol. > > In HTTP, for instance, not only can I receive multipart content that > defines boundaries separating each JSON object, but I can also get helpful > metadata like Content-Length, Content-Encoding, etc. (Granted, using this > also ties one into a request/response model with the overhead of an HTTP > parser.) > > I'm curious what your use cases are for character-delimited JSON objects > over-the-wire. (I can speculate, but I find the real world is usually more > interesting.) > > > Certainly — real examples are far better! > > I actually used '\0' delimited JSON streams to implement a dual-server > variant of JSON-RPC2 over TCP sockets for [Bellite's Interprocess > protocol<http://bellite.io/docs/api/#ipc> > ](http://bellite.io/docs/api/#ipc). Creating small implementations was > then straight forward for the host C++ server and the language bindings > like [bellite-node <https://github.com/bellite/bellite-node>]( > https://github.com/bellite/bellite-node), Python, Ruby & PHP. Using > delimited streams made the work considerably easier since the built-in JSON > parsing did not support JSON streaming for those languages. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
