<div>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.</div><div>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?</div><div> </div><div>Thanks,</div><div>Yash</div><div> </div><div><br>On Friday, January 18, 2013 5:51:12 PM UTC+5:30, Dmitry Kolesnikov wrote:</div><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote"><div style="word-wrap: break-word;"><div>Hello,</div><div><br></div><div>check this one <a href="https://github.com/talentdeficit/jsx.git" target="_blank">https://github.com/<wbr>talentdeficit/jsx.git</a></div><div><br></div><div>- Dmitry</div><br><div><div>On Jan 18, 2013, at 2:18 PM, Yash Ganthe <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="T4KMcIy8x6QJ">yas...@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div class="gmail_quote">
<div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal">If I have about 10000 records in an JSON such as this,<u></u><u></u></p><p class="MsoNormal">{ "d" : <u></u><u></u></p><p class="MsoNormal">[<u></u><u></u></p><p class="MsoNormal"> {<u></u><u></u></p><p class="MsoNormal"> <wbr> "ID": 1, "Name": "p1", "Email": "<a href="javascript:" target="_blank" gdf-obfuscated-mailto="T4KMcIy8x6QJ">p...@p1.com</a>"<u></u><u></u></p><p class="MsoNormal"> }, <u></u><u></u></p><p class="MsoNormal"> {<u></u><u></u></p><p class="MsoNormal"> <wbr> "ID": 2, "Name": "p2", "Email": "<a href="javascript:" target="_blank" gdf-obfuscated-mailto="T4KMcIy8x6QJ">p...@p2.com</a>"<u></u><u></u></p><p class="MsoNormal"> }, <u></u><u></u></p><p class="MsoNormal"> {<u></u><u></u></p><p class="MsoNormal"> <wbr> "ID": 3, "Name": "p3", "Email": "<a href="javascript:" target="_blank" gdf-obfuscated-mailto="T4KMcIy8x6QJ">p...@p3.com</a>"<u></u><u></u></p><p class="MsoNormal"> }, <u></u><u></u></p><p class="MsoNormal"> {<u></u><u></u></p><p class="MsoNormal"> <wbr> "ID": 4, "Name": "p4", "Email": "<a href="javascript:" target="_blank" gdf-obfuscated-mailto="T4KMcIy8x6QJ">p...@p4.com</a>"<u></u><u></u></p><p class="MsoNormal"> } . . . . .<u></u><u></u></p><p class="MsoNormal">] }<u></u><u></u></p><p class="MsoNormal">the entire JSON string would have to be first obtained and then passed to mochijson/mochijson2.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Yash</p></div></div></div>
______________________________<wbr>_________________<br>erlang-questions mailing list<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="T4KMcIy8x6QJ">erlang-q...@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br></blockquote></div><br></div></blockquote>