jsonriver is a lightweight streaming JSON parser that incrementally parses JSON data as it arrives from network requests or language models. It yields progressively complete values while maintaining type consistency and correctness guarantees. The library has zero dependencies, works in any JavaScript environment, and passes the JSONTestSuite validation. While slower than native JSON.parse for complete data, it enables real-time processing of streaming JSON with predictable mutation patterns for strings, arrays, and objects.

3m read timeFrom github.com
Post cover image
Table of contents
Incremental ValuesCorrectnessInvariantsSee alsoDevelopment

Sort: