3 ms·
It's too bad there aren't more streaming JSON parsers like oboe.js[1]. It would be nice if parsing libraries always supplied an event-based approach like this
by fiddlerwoaroof 2y ago
It's too bad there aren't more streaming JSON parsers like oboe.js[1]. It would be nice if parsing libraries always supplied an event-based approach like this in addition to parsers that build up the entire data structure in memory.
[1]: https://github.com/jimhigson/oboe.js https://github.com/jimhigson/oboe.js
EDIT: looking around a bit, I found json-stream ( https://github.com/dgraham/json-stream https://github.com/dgraham/json-stream ) for Ruby.
- Alifatisk 2y agoThere's even more alternatives at the bottom https://github.com/dgraham/json-stream?tab=readme-ov-file#alternatives https://github.com/dgraham/json-stream?tab=readme-ov-file#al...
- e12e 2y agoI recently looked a little at streaming large JSON files in ruby - but ran into some problems trying to stream from and to gzipped files via layering ruby io-objects. In theory it should just be stacking streams, but in practice it was convoluted, a little brittle and quite slow.