partial-json
Parser for incomplete JSON generated by LLMs during streaming.
How partial-json is used
partial-json is a dependency in 9 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 31 projects, and what it is used with below comes from all of them. Projects that use it most often also use Zod (100.0%), dotenv (90.3%), OpenAI (83.9%).
partial-json popularity over time
Gid Score 46: downloads 80, use in agent projects 34, GitHub stars 0, downloads trend 67 (each 0-100). How it is calculated.
Often used with partial-json
| Zod | 100.0% of partial-json projects · 4.0× more than average |
|---|---|
| dotenv | 90.3% of partial-json projects · 5.8× more than average |
| OpenAI | 83.9% of partial-json projects · 18.3× more than average |
| Vitest | 80.6% of partial-json projects · 3.9× more than average |
| diff | 77.4% of partial-json projects · 92.4× more than average |
| ws | 77.4% of partial-json projects · 24.6× more than average |
| tsx | 74.2% of partial-json projects · 4.9× more than average |
| Anthropic SDK | 67.7% of partial-json projects · 18.1× more than average |
From all 31 projects in our scan that use partial-json, including the dependency samples.
By coding agent
| Claude Code | 0.2% of projects set up for it |
|---|---|
| OpenClaw | 2.3% of projects set up for it |
| GitHub Copilot | 0.2% of projects set up for it |
Share of public repos configured for each agent that list partial-json as a dependency.
Install
| Package | npm install partial-json |
|---|---|
| Main stacks | TypeScript / JavaScript (16), Next.js (15) |
| Example projects | lobehub/lobehub, vual/lobe-chat-pro, cyanheads/mcp-ts-core, isaccanedo/lobe-chat, CharlesHoskinson/dancesWithClaws |
Alternatives to partial-json
In our scan, none of the most used tools in Prompts, structured output and evals does the same job as partial-json: they are add-ons, companions or tools for a different task.
More in Prompts, structured output and evals: Ultracite tiktoken (Python) tokenizers LangSmith Langfuse (Python) GPT Tokenizer TokenLens @graphql-codegen/typescript-operations