NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #601 most downloaded on PyPI
A package to repair broken json strings
Last release 12 days ago
22 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
3 years old
180 releases · first in 2023
One column per quarter.
Fix #230 preserve positive exponents
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #220 preserve leading quotes when a later valid delimiter closes the string
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #213 preserve valid JSON with trailing garbage
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #212, the heuristic to detect array boundaries nested inside objects needed some refinement. Now it is a bit smarter.
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #211, Python-style tuple support didn't mix well with the new feature release in 0.63.0
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #210, some LLMs get a bit too python-y and use None instead of Null. Support this case but only when that's the only malformed exception
None instead of Null. Support this case but only when that's the only malformed exception{ "key": TrueBlue } would be erroneously repaired as { "key": True }, this is fixed nowjson_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #209, retry subsequent top-level fragments in salvage mode when an earlier candidate fails schema validation, returning the first matching fragmen
salvage mode when an earlier candidate fails schema validation, returning the first matching fragmentjson_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #207, respect multiple backslashes in strings when they have no additional meaning
skip_json_loads=Truejson_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #206, tidy up parsing of regex inside objects values
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #205 preserve root schema refs in union validation
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #204, the previous version had a fast-path detection that was too narrow and failed when a schema was passed and trailing garbage was present
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #204, the string parsing heuristic was a bit too trigger happy. Also add a fast path when a valid json follows some LLM blurb
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix various performance hot spots and some security best practices
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix various performance issues that led to quadratic time complexity for very large json strings with a lot of commas and/or quotes
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #202, unwrap double-serialized schema-guided nested JSON strings. In case the schema expects an object or an array and the json is a string, try t
salvage mode is enabled, try to repair the serialized object or array.json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
A potential infinite loop in schema resolution could cause an application using the library to crash if the schema was self referential
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Support for repairing string values that contain low smart quote spans like „... when the closing quote is emitted as ASCII " instead of Unicode ”. Is
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fixed a parser-path repair bug where balanced brace groups inside string values, such as LaTeX fragments like \frac{x^2}{m}, could be mistaken for obj
\frac{x^2}{m}, could be mistaken for object structure when a later inline JSON-like snippet appeared in the same string.{"blank_1": "5"} without splitting the surrounding object.json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
-Fix #196, a regression introduced to fix #170 caused issue with top-level object duplication.
-Fix #196, a regression introduced to fix #170 caused issue with top-level object duplication.
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
The previous fix for #195 was too narrow and left many cases out, now it fixes more broadly
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #195, in some cases the parser would eat escaping backslashes
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #194, the presence of a bracket in a comment line would mess up the repair
json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix load(fd) so repair starts from the current position of the file object.
load(fd) so repair starts from the current position of the file object.json.loads fast path.json_repair is maintained as a side project and stays free for everyone.
If it saves you debugging time, helps you handle LLM-generated JSON, or is part of your production workflow, please consider:
Sponsorship helps justify the time spent fixing edge cases, improving performance, and keeping the library reliable.
Fix #193, improve handling of various exceptions and corner cases related to code fences when the LLM outputs code
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #192, preserve literal fenced snippets in multiline strings
ValueError in case the library hits a RecursionErrorThis library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #189, when an LLM emits unescaped JSON like {"blank_1": "..."} inside a quoted explanation string. Previously the parser could split the parent st
{"blank_1": "..."} inside a quoted explanation string. Previously the parser
could split the parent string, invent extra object members, or even change the top-level shape when another member followed.This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #191, 0.59.0 introduced a regression when the json was preceded by text with parentheses
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #190, support python style array syntax ()
()parse_commentThis library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix the regressions reported in #187:
Fix the regressions reported in #187:
{\\"key\\": \\"value\\"} could be misrepaired as arrays instead of objects.{"a", "b"} can be recovered as {"a": null, "b": null} when schema = {"type": "object"} is provided and schema_repair_mode="salvage"This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Typing stubs were all over the place, fixed that and added tests so that mypy does not fail for developers with strict typing
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Improved parser performance, especially for common JSON containing ordinary quoted strings. Profiler indicates a 60% improvement in performance.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
v0.58.3 added some regressions in which salvage mode could repair _less_ than standard mode. Fixed that regression and some minor changes.
salvage mode could repair less than standard mode. Fixed that regression and some minor changes.This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #181, fix another bug in duplicate-key dedup for array objects
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #181, fix a corner in case in which duplicate keys won't be deduplicated and instead split inside an array.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #180, expand schema salvage mode coverage to fix more obvious corner cases that are easily identifiable (unwrapping arrays, add required fields th
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #178, some additions to the schema based repair mode:
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Valid json that do not validate against the schema are not treated as invalid. For example {"value":"1"} is a valid JSON but does not validate against
{"value":"1"} is a valid JSON but does not validate against {"type":"object","properties":{"value":{"type":"integer"}},"required":["value"]}. With this fix the input is passed to the parser and coerced into the now valid {"value": 1}. With this fix the schema validator feature moves to beta status.This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Improve schema validation, validate all output produced by the library against the schema including valid json
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Many of you (#177, #170, #87, #52, #50) have asked for the ability of json_repair to follow a jsonschema/Pydantic object. This is the release that add
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #176, repair missing row arrays in table-like JSON. If a json represents a matrix, change the array-merge heuristic to cover this case.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #174, UUIDs starting with a number and followed by e were incorrectly parsed as scientific notation.
This release is sponsored by @Icana-AI and @mjharte. Thank you very much for your generous donation!
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #173, manage the edge case in which there are two closing braces for an object inside an array.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #172, in array context, when an object closing brace was missing and it was followed by a closing array bracket, the repair action was incorrect
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #170, do not return empty elements in case of multiple elements detected in the same invalid json string
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #169, respect python style number notation.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Nothing published for this version
Fix #168, sometimes an empty array was incorrectly parsed when in object context.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fix #159, sometimes LLMs might insert a json .. block in the middle of a normal json string. Try to manage this edge case and normalize the json.
Fix #159, sometimes LLMs might insert a ```json .. ``` block in the middle of a normal json string. Try to manage this edge case and normalize the json.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fixed #160, sometimes very long json could lead to a max recursion depth exception. Fixed now.
Fixed #160, sometimes very long json could lead to a max recursion depth exception. Fixed now.
This release is sponsored by @kojoopuni. Thank you very much for your generous donation!
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fixed #158, in some cases the library could return an IndexError. Added checks to prevent that.
Fixed #158, in some cases the library could return an IndexError. Added checks to prevent that.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fixed #156, the parser did not reset context when it detected the potential for multiple jsons in the same string, leading to all kind of possible iss
Fixed #156, the parser did not reset context when it detected the potential for multiple jsons in the same string, leading to all kind of possible issues.
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fixed #155, handle an edge case in which an object ends without a proper delimiter first and the LLM adds a code fence at the end
Fixed #155, handle an edge case in which an object ends without a proper delimiter first and the LLM adds a code fence at the end
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fixed #154, sometimes when repairing a confusing delimiter the poor closing brace was involved. Try not do that anymore
Fixed #154, sometimes when repairing a confusing delimiter the poor closing brace was involved. Try not do that anymore
This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
Fixed #153, in some cases you could have {'element 1', 'element 2'} in which the square brackets are replaced by curly brackets, added support for thi
{'element 1', 'element 2'} in which the square brackets are replaced by curly brackets, added support for this caseThis library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider offering me a beer via this link: https://github.com/sponsors/mangiucugna
PR #151, from @kba977. Extend an object if the parser detects that it was closed too early.
This release is sponsored by @yasyf. Thank you very much for your generous donation!
This library is open-source and available for everyone, maintained and improved as a passion project during my free time. If it has made your work easier or added value to your projects, I’d greatly appreciate your support!
You can contribute by buying me a virtual beer through this link: https://github.com/sponsors/mangiucugna.
Fix #148, strengthen the logic introduced in #146 and prevent an index error.
This release is sponsored by @yasyf. Thank you very much for your generous donation!
This library is open-source and available for everyone, maintained and improved as a passion project during my free time. If it has made your work easier or added value to your projects, I’d greatly appreciate your support!
You can contribute by buying me a virtual beer through this link: https://github.com/sponsors/mangiucugna.
Fix #146, the management of wrong delimiters in array context was too simplistic, now it's much more refined
This release is sponsored by @yasyf. Thank you very much for your generous donation!
This library is open-source and available for everyone, maintained and improved as a passion project during my free time. If it has made your work easier or added value to your projects, I’d greatly appreciate your support!
You can contribute by buying me a virtual beer through this link: https://github.com/sponsors/mangiucugna.
PR #144, return empty list as repair action log when logging=True but no repair was made. Thanks to @qchappat for contributing!
logging=True but no repair was made. Thanks to @qchappat for contributing!This release is sponsored by @yasyf. Thank you very much for your generous donation!
This library is open-source and available for everyone, maintained and improved as a passion project during my free time. If it has made your work easier or added value to your projects, I’d greatly appreciate your support!
You can contribute by buying me a virtual beer through this link: https://github.com/sponsors/mangiucugna.
Fix #141, remove superfluous escaping from delimiters when we found one
This release is sponsored by @yasyf. Thank you very much for your generous donation!
This library is open-source and available for everyone, maintained and improved as a passion project during my free time. If it has made your work easier or added value to your projects, I’d greatly appreciate your support!
You can contribute by buying me a virtual beer through this link: https://github.com/sponsors/mangiucugna.
Fix #140, a corner case that happens when an object inside an array has a misplaced quote would mess the object structure
This release is sponsored by @yasyf. Thank you very much for your generous donation!
This library is open-source and available for everyone, maintained and improved as a passion project during my free time. If it has made your work easier or added value to your projects, I’d greatly appreciate your support!
You can contribute by buying me a virtual beer through this link: https://github.com/sponsors/mangiucugna.
Your coding agent can read these notes before it upgrades. Set up the MCP server →