mangiucugna/json_repair
Repair malformed JSON from LLMs, APIs, logs, and user input in Python. observed · 2026-10-21
Health v2 · maintenance only
92/100
- Activity 100
- Release rhythm 88
- Longevity 81
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 5
- age_days: 1140
- days_rel: 1
- days_push: 1
- n_releases_24m: 96
Adoption not part of the score
5119 stars · 225 forks observed · 2026-10-21
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Python library that repairs malformed JSON strings, such as broken output from LLMs, APIs, logs, or user input. It works as a drop-in fallback for .loads(), supports schema-guided repair, streaming, and also provides a CLI and online demo.
Use cases
- parse malformed JSON from LLM responses
- fix broken JSON with missing quotes and trailing commas
- repair truncated JSON from logs or APIs
- validate and coerce JSON against a JSON Schema
- drop-in replacement for .loads on unreliable input
- repair JSON in streaming LLM output
When to choose
- you consume JSON from LLMs that often emit invalid syntax
- you need a lightweight Python fallback when .loads fails
- you want schema-guided repair and type coercion
- you need to fix JSON from logs, webhooks, or user input
When to avoid
- your JSON is already well-formed and standard .loads suffices
- you need strict validation that rejects rather than repairs invalid input
- you work outside the Python ecosystem
Facets
library · maturity active
parser serialization cli large-language-models developer-tools parsers apis python cli cross-platform -repair llm-output structured-output pydantic -schema streaming
3 sources
- readme: https://github.com/mangiucugna/json_repair · fetched 2026-10-21 · 57c8dd9170ef
- homepage: https://mangiucugna.github.io/json_repair/ · fetched 2026-08-29 · 39ca3fd40535
- registry_pypi: https://pypi.org/pypi/json_repair/json · fetched 2026-08-29 · 031c36b00a5c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mangiucugna/json_repair | main | 92 |
For agents
markdown · JSON · MCP: product_card(name="mangiucugna/json_repair")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem