[erlang-questions] Question regarding JSX Erlang parser

Tim Watson watson.timothy@REDACTED
Tue Jan 22 10:35:36 CET 2013


Hi

On 22 Jan 2013, at 06:02, yashgt@REDACTED wrote:

> Hi,
> 
> I came across https://github.com/talentdeficit/jsx. I have a couple of questions regarding this module:
> 
> 1. Does it allow us to parse JSON data being served over an HTTP stream? This might be useful for consuming web services that serve JSON. If so, is there any example code that shows how this can be done?
> 

Yes it can be done, but I can't release the code as it was proprietary. This is fairly simple however, so long as you've got either a direct connection to the socket (which was how our code worked) or a library/API that allows you to wire the incoming chunks to JSX's continuation mechanism.

> 2. Does it read the entire JSON data into memory or does it behave like a SAX parser where the data is read in chunks?
> 

It behaves like a SAX parser where the data is read in chunks, providing you use the continuations API explicitly.


More information about the erlang-questions mailing list