[erlang-questions] SAX-like JSON Parser for Erlang
Yash Ganthe
yashgt@REDACTED
Fri Jan 18 14:31:41 CET 2013
This module looks really good. The documentation mentions "incomplete"
data. I assume this ti be a case where we want to read data from an HTTP
response.
I could not find an exported method in the module that lets me pass a
stearm to jsx and get event to fire when individual objects are read from
the stream. Is this supported in the module?
Thanks,
Yash
On Friday, January 18, 2013 5:51:12 PM UTC+5:30, Dmitry Kolesnikov wrote:
> Hello,
>
> check this one https://github.com/talentdeficit/jsx.git
>
> - Dmitry
>
> On Jan 18, 2013, at 2:18 PM, Yash Ganthe <yas...@REDACTED <javascript:>>
> wrote:
>
> SAX allows the client application to read an XML piece-by-piece. This is
> different than DOM which expects the entire XML to be loaded in memory. SAX
> is thus useful for reading very large XML documents.****
>
> ** **
>
> Mochijson is a good JSON parser which emits structs that correspond to
> individual JSON strings. It however expects the entire JSON string to be
> given to its functions.****
>
> If I have about 10000 records in an JSON such as this,****
>
> { "d" : ****
>
> [****
>
> {****
>
> "ID": 1, "Name": "p1", "Email": "
> p...@REDACTED <javascript:>"****
>
> }, ****
>
> {****
>
> "ID": 2, "Name": "p2", "Email": "
> p...@REDACTED <javascript:>"****
>
> }, ****
>
> {****
>
> "ID": 3, "Name": "p3", "Email": "
> p...@REDACTED <javascript:>"****
>
> }, ****
>
> {****
>
> "ID": 4, "Name": "p4", "Email": "
> p...@REDACTED <javascript:>"****
>
> } . . . . .****
>
> ] }****
>
> the entire JSON string would have to be first obtained and then passed to
> mochijson/mochijson2.****
>
> ** **
>
> I am looking for a way to let the module give me one record at a time from
> the large JSON-formatted array. Is there any module that lets us do this?*
> ***
>
> ** **
>
> Thanks,****
>
> Yash
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@REDACTED <javascript:>
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130118/89f62a91/attachment.htm>
More information about the erlang-questions
mailing list