iw4p/partialjson
+1M Downloads! Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing ChatGPT and llm JSON stream response — Partial and incomplete JSON parser python library for OpenAI | repair invalid JSON, parse output of LLMs
When working with AI language models, you often receive data that looks like a structured list or object, but it's cut off or malformed. This tool takes that incomplete, text-based output from an AI and converts it into a usable, structured data format like a Python dictionary or list, even if it's not perfectly formed. It's for developers building applications that rely on AI responses, ensuring they can reliably process the AI's output into structured data for further use.
Available on PyPI.
Use this if you are a developer integrating Large Language Models and need to reliably parse incomplete or malformed JSON responses from them into structured data.
Not ideal if you are looking for a general-purpose JSON validation or formatting tool, or if your primary need is not related to processing AI model outputs.
Stars
99
Forks
7
Language
Python
License
MIT
Category
Last pushed
Feb 19, 2026
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/iw4p/partialjson"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Compare
Related tools
mangiucugna/json_repair
A python module to repair invalid JSON from LLMs
antfu/shiki-stream
Streaming highlighting with Shiki. Useful for highlighting text streams like LLM outputs.
yokingma/fetch-sse
An easy API for making Event Source requests, with all the features of fetch(), Supports...
kaptinlin/jsonrepair
A high-performance Golang library for easily repairing invalid JSON documents. Designed to fix...
HAibiiin/json-repair
Repair JSON! A Java library for fixing JSON anomalies generated by LLMs.