A package to repair broken json strings
This simple package can be used to fix an invalid json string. To know all cases in which this package will work, check out the unit test.
Offer me a beer
If you find this library useful, you can help me by donating toward my monthly beer budget here: https:/github.com/sponsors/mangiucugna
Demo
If you are unsure if this library will fix your specific problem, or simply want your json validated online, you can visit the demo site on GitHub pages: https:/mangiucugna.github.io/json_repair/
Or hear an audio deepdive generate by Google's NotebookLM for an introduction to the module
Motivation
Some LLMs are a bit iffy when it comes to returning well formed JSON data, sometimes they skip a parentheses and sometimes they add some words in it, because that's what an LLM does.
Luckily, the mistakes LLMs make are simple enough to be fixed without destroying the content.
I searched for a lightweight python package that was able to reliably fix this problem but couldn't find any.
So I wrote one
Wo
- RPM
- python3-json-repair-0.60.1-1.lbn42.noarch.rpm
- Summary
- A package to repair broken json strings
- URL
- https://pypi.org/project/json-repair
- Group
- Unspecified
- License
- ZPL
- Source
-
python-json-repair-0.60.1-1.lbn42.src.rpm
- Checksum
- 2fa5fedd7afd100e1c68a95c774b07584fd95422dae1b1ef7d03c35f6743e326
- Signing Signature
- HEX_SIG:8902330400010a001d1621045d5e2fa2
- Build Date
- 2026/08/23 08:22:05
- Requires
-
/usr/bin/python3
- Provides
-
python-json-repair = 0.60.1-1.lbn42
python3-json-repair = 0.60.1-1.lbn42
python3.13-json-repair = 0.60.1-1.lbn42
python3.13dist(json-repair) = 0.60.1
python3dist(json-repair) = 0.60.1
- Obsoletes