#22 · Primary category: NLP Tools & Text Processing
json_repair
Repair malformed JSON from LLMs, APIs, logs, and user input in Python.
Project last updated:08/27/26
GitHub Stars
5.1K
Forks
214
Contributors
20
License
MIT
Why we included this project
Large language models are great at producing text and only okay at producing valid JSON. json_repair is a small Python library that cleans up the mess when a model closes a brace too early, drops a comma, or pads the output with a stray sentence. It plugs into existing code as a drop-in replacement for json.loads(), trying strict parsing first and only invoking the repair parser when standard JSON fails. For teams routing LLM output into databases or schema-validated pydantic models, that fallback can mean the difference between a pipeline that runs and one that dies on a parse error every few requests. It is a focused utility, not a framework, so adding it is a one-line install rather than an architectural decision.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
flair
A very simple framework for state-of-the-art Natural Language Processing (NLP)
compromise
modest natural-language processing
tokenizers
💥 Fast State-of-the-Art Tokenizers optimized for Research and Production
CoreNLP
CoreNLP: A Java suite of core NLP tools for tokenization, sentence segmentation, NER, parsing, coreference, sentiment analysis, etc.
Chinese-Word-Vectors
100+ Chinese Word Vectors 上百种预训练中文词向量