NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #672 most downloaded on PyPI
A package to repair broken json strings
Last release 8 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 #139, a bug array context and stream stable would cause an empty object
This release is sponsored by @gitsome and @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 #138, fix a regression on handling dangling quotes
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 #137, comments were parsed wrongly if at the beginning of a string
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 #135, fix a crash due to a regression
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.
Add a fix for a corner case when the string is heavily escaped
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 #134, when "key": , is found, fill the value with an empty string
"key": , is found, fill the value with an empty stringThis 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.
You can now pass to repair_json all extra arguments that json.dumps accepts, no need to do workarounds anymore!
repair_json all extra arguments that json.dumps accepts, no need to do workarounds anymore!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 #132, support more complex escape sequences especially when many escapes are spit by the LLM
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 #131, respect the unicode escape sequences to behave like json after a repair action
json after a repair actionThis 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 #130, an edge case would send the parser in an infinite loop
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 #126, add a fix for an edge case in which an unclosed array inside an object leads to a weird parsing mistake
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.
Fixed #123, a regression when added the ability to parse comments
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.
Drop support for 3.9, since it has been deprecated for over 6 months
repair_json() skip json.dumps() if the parser returns an empty string. This breaks the old behavior, so make sure to adjust your logic if you rely on thisThis 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 #111, typing fixes to improve support for developers
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
PR #109, add a new parameter stream_stable to process streams (see README)
PR #109, add a new parameter stream_stable to process streams (see README)
Fix #108, a stupid oversight would cause a bug with multiple arrays in a row
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 #108, add a new repair action to fix cases like { "key": ["a"], ["b"] } => { "key": ["a", "b"] }
Fix #108, add a new repair action to fix cases like { "key": ["a"], ["b"] } => { "key": ["a", "b"] }
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 #106, strings like "6seventy" were interpreted as number before. Now it will be interpreted as a string.
Fix #106, strings like "6seventy" were interpreted as number before. Now it will be interpreted as a 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 #104, remove garbage prints because I forgot to push the commit in the previous release. Apologies everyone!
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 #103, sometimes LLMs "change their mind" midway and give multiple similar-but-slightly-different outputs. Introducing an heuristic to deduplicate
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 #101, add support for stray quotes in object keys
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 #100, the ability to repair strings like "lorem "ipsum" sic" was not working correctly inside a nested 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
Support for stdin in the cli command with syntax like cat file.json | json_repair
cat file.json | json_repairThis 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 #98, added explicit support for code-like comment style: //, #, /* */
//, #, /* */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
After many releases the benchmarks started showing a slowdown, found a 10% performance improvement
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 #94, if the string contained a ":" outside of the json to repair, this would case a repair action to fail
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 #95, thanks to @sean-weber-cambri for pushing PR #96. Fix a corner case around managing nested arrays in objects
This release is sponsored by @amzker. 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 #91, when a key is missing a right delimiter (but not the left one) there could be cases in which this can be repaired safely.
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 #89, improve a corner case check in which stray quotes will lead the parser astray
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
Better handling of unescaped quotes inside arrays
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 #86, in array context if an object has repeated keys it's not valid and can be split up. This will allow to find cases in which the brace is missi
This release is sponsored by @drunkel. 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 #85, fixed a regression introduced in 0.30.x with managing quotes inside quotes in strings.
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 #83, enhance JSONParser to handle end of array context, and add test for edge case with missing string delimiter in 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 #81, manage an edge case happening when an LLM will just plainly refuse to use delimiters with strings
This release is sponsored by @tomasonjo. 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 #80, the check on when a delimiter was potentially missing, but the string was followed by a comma, was too strict. Relaxed it with new edge cases
This release is sponsored by @tomasonjo. 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 #76 (reprise), manage curly brackets when a string has no delimeters. Do a much more in depth check to understand if the curly bracket is closing
This release is sponsored by @tomasonjo. 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 #76, when missing squared or curly brackets, handle the corner cases more gracefully to avoid false positives.
This release is sponsored by @tomasonjo. 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 #77, a regression introduced with the previous version. Manage a trailing comma in object value context when delimiters are missing.
This release is sponsored by @tomasonjo. 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 #75, fix more uses cases of misplaced quotes that LLM keep coming up with.
This release is sponsored by @tomasonjo. 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 #74, an old design choice I made in the past to fix escaping breaks LaTex strings. I can just remove that choice as there are no downsides.
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 #73, handle a corner case in which a rstring_delimeter is missing and is possible to determine that it's a full string without cutting it to piece
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 #72, when the parser was trying to figure out if a string delimiter was missing, it was not checking if that delimiter was escaped and therefore n
fix even more performance issue and get a 20% improvement from the baseline. Bringing the library back to the performance of a few versions ago.
Simplified the logging logic greatly, removed complexity and made the overall library faster by reducing the time penalty for calls that do not enable
Fix #70, manage a situation in which a single word is followed by a comma before the closing quote.
Fix documentation and tests for CLI, add the --output option as it was missing in the first release
--output option as it was missing in the first releaseFeature Request #68, added the ability to call json_repair from the CLI. Please refer to README.md to check all the options available via command-line
Fix #66, from_file() was extremely slow because it was reading one byte at a time, now the library will read the file in large chunks to speed up. Tha
from_file() was extremely slow because it was reading one byte at a time, now the library will read the file in large chunks to speed up. Thanks to @benjamingr for reporting the issue and pushing a PR to resolve the bug.This release is sponsored by @graingerkid. Thank you very much for your 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
The previous release broke python 3.8 and 3.9. Sorry folks
For the developers using mypy, the library is finally 100% compliant with mypy and it's part of pre-commit checks from now on. Feel free to push a PR
PR #65, More type hinting fixes to be compatible with mypy users. Thanks to @d-hage for pushing this PR
Fix #64, so far the library was fully typed but would throw a warning with mypy. Added support for it
Better handling of empty key values and remove lots of dead code, plus better test coverage
Fix #62, an off by one error made it so that correct escaped sequences were not treated properly if they were at the beginning of the string.
PR #63, allow numbers to be object keys, transforming them to string first
Thanks to @andsmi97 for contributing with this PR!
Adding ensure_ascii to the options of repair_json. By default json.dumps() sets ensure_ascii=True this is particularly a problem for chinese text that
repair_json. By default json.dumps() sets ensure_ascii=True this is particularly a problem for chinese text that has no ascii representation. Setting ensure_ascii=False will prevent chinese text from being converted into weird escaped characters in ascii and remain unicode.load function should behave like loads(). That wasn't the case so far.This release is sponsored by @t0mmili and @nhend. Thank you very much for your 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 #57, sometimes a string can look like ""string" a bug was preventing the library from fixing it like "string".
""string" a bug was preventing the library from fixing it like "string".This release is sponsored by @MorDvash. Thank you very much for your 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 #55, a fix a regression bug. Array of strings not separated by commas were not repaired.
Fix #54, fix the maximum recursion depth reached error in case the malformed json is a long long string.
maximum recursion depth reached error in case the malformed json is a long long string.This release is sponsored by @ahhardin. Thank you very much for your 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
As additionally reported in #53, there can be cases in which not only quotes are missing but also commas are missing. That is kind of a mess, but with
Fix #53, change how missing left delimeters are handled in object context to take into account the possibility that the right side might not be missin
Your coding agent can read these notes before it upgrades. Set up the MCP server →