Incremental JSON parser for streaming LLM tool calls in Ruby
Incremental JSON parser for streaming LLM tool calls in Ruby
Built this for streaming AI tool calls. LLMs stream function arguments as JSON character-by-character. Most parsers reparse from scratch each time - O(n²) behavior that causes UI lag. This maintains parsing state, processing only new characters. True O(n) performance that stays imperceptible throughout the entire response. Ruby gem, MIT licensed. Would love feedback.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Jwalk, a Streaming JSON Parser for Unix
liblaxjson - a relaxed streaming JSON parser C library
liblaxjson - a relaxed streaming JSON parser C library
Strace to JSON parser
I wrote a lovely JSON parser in ANSI-C
JSON Parser in C
Parson, lighweight json parser in C
jsoon, a streaming JSON parser and query engine in C
Partial-zod – streaming JSON parser for LLMs (zero deps, Zod-native)
Go, JSON, Streaming and Generics