3 ms·
I have to parse this whole thing into memory and then pull out the part I want? You do that with JSON too, don't you? Are there SAX-like parsers for JSON? If
by m_eiman 17y ago
I have to parse this whole thing into memory and then pull out the part I want?
You do that with JSON too, don't you? Are there SAX-like parsers for JSON?
If it's a big file it'll be big in JSON too.
- loup-vaillant 17y agoIf the file is big, chances are that it is basically a sequence of relatively small chunks. You don't need SAX parsing for this. Just read the file one chunk at a time.
- jmillikin 17y agoThere are a few event-based JSON parsers; yajl is the most famous, though its interpretation of the JSON spec is a bit liberal for my tastes.