qdxiao/llmjsonrepair
llmjsonrepair 是一个专门修复大语言模型(LLM)输出 JSON 格式错误的 Go 语言库。当 ChatGPT、Claude 等 AI 模型生 成的 JSON 因输出截断、缺少引号、括号未闭合等问题无法正常解析时,该库能智能修复这些错误。支持深度嵌套结构修复 、多 JSON 对象流处理、上下文感知解析等功能。提供 Repair() 和 Loads() 两个简洁 API,一行代码即可修复残缺 JSON 并返回格式化结果或数据结构
This is a Go library that helps developers fix malformed JSON output from large language models (LLMs) like ChatGPT or Claude. It takes unparsable JSON strings – often due to truncation, missing quotes, or unclosed brackets – and intelligently repairs them, returning either a correctly formatted JSON string or a parsed data structure. Developers building applications that rely on LLM-generated structured data will find this tool useful.
No commits in the last 6 months.
Use this if your application frequently receives incomplete or incorrectly formatted JSON from LLMs that prevents proper data processing.
Not ideal if you primarily work with perfectly formed JSON or need a general-purpose JSON validation library unrelated to LLM output.
Stars
11
Forks
—
Language
Go
License
—
Category
Last pushed
Aug 31, 2025
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/qdxiao/llmjsonrepair"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
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...
iw4p/partialjson
+1M Downloads! Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing...
kaptinlin/jsonrepair
A high-performance Golang library for easily repairing invalid JSON documents. Designed to fix...