Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The article mentions SAX parsers and then kinda just moves on and talks a bit about loading JSON with eval. I realize there are other ways of doing things and a fair bit between his two data processing points. My experience with JSON is mostly limited to simple APIs.

Is there a way to handle streaming JSON? I guess it'd be doable in a language like JavaScript where you build up the prototype. Others would probably vary substantially. But I can't say I've tried it yet.



Yes, there is support for stream parsing of JSON. I haven't tried it myself, https://github.com/lloyd/yajl is one example, which has various bindings in other languages.


Ahh, silly me. I never realized YAJL handled that. It should be a good place to learn from. The YAJL code base is pretty tight IIRC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: