qdxiao/llmjsonrepair

llmjsonrepair 是一个专门修复大语言模型(LLM)输出 JSON 格式错误的 Go 语言库。当 ChatGPT、Claude 等 AI 模型生 成的 JSON 因输出截断、缺少引号、括号未闭合等问题无法正常解析时,该库能智能修复这些错误。支持深度嵌套结构修复 、多 JSON 对象流处理、上下文感知解析等功能。提供 Repair() 和 Loads() 两个简洁 API,一行代码即可修复残缺 JSON 并返回格式化结果或数据结构

14
/ 100
Experimental

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.

LLM application development AI data processing Go programming Structured data extraction
No License Stale 6m No Package No Dependents
Maintenance 2 / 25
Adoption 5 / 25
Maturity 7 / 25
Community 0 / 25

How are scores calculated?

Stars

11

Forks

Language

Go

License

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.