promplate/partial-json-parser-js

Parse partial JSON generated by LLM

37
/ 100
Emerging

Handles incomplete JSON structures from streaming LLM responses by selectively accepting partial strings, numbers, arrays, objects, and special values (NaN, Infinity) through a bitwise flag system. Uses a pure JavaScript parser that reconstructs valid data as much as possible rather than failing on truncated input, enabling real-time data streaming without waiting for complete JSON. Provides both CommonJS and ESM builds with granular control over what types are allowed to remain incomplete.

222 stars. No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 2 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 9 / 25

How are scores calculated?

Stars

222

Forks

8

Language

TypeScript

License

MIT

Last pushed

Aug 04, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/prompt-engineering/promplate/partial-json-parser-js"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.