Launch json-repair.
π― Why Choose JSON Repair?
- ποΈ GO Compatibility: Our library ensures a seamless experience for Go developers with its excellent compatibility.
- π Zero Dependencies: We've crafted a tool with zero external dependencies, keeping it lean and mean.
- π Rich Test Cases: Benefit from a comprehensive suite of test cases that ensure reliability and accuracy.
- π€ Auto-Detection & Repair: Intelligently identifies and corrects a wide range of JSON errors, from syntax to structural issues.
- π Customizable: Offers the flexibility to tailor the repair process to your project's specific needs.
- βοΈ No Anxiety About Error: json-repair always gives the string result.
- π Open Source: Join a vibrant community of developers contributing to the ongoing evolution of the toolkit.
π Supported Broken LLM JSON Output
- Single quote
" - Line feed
\n - Improperly formatted JSON string
{"key": TRUE, "key2": FALSE, "key3": Null - String with mixed quotes
{'key': 'string', 'key2': false, \"key3\": null, \"key4\": unquoted} - Unclosed array
[1, 2, 3, 4 - Unclosed array object
{"employees":["John", "Anna", - Standalone left bracket
[ - Standalone right bracket
] - Array with extra line breaks
[[1\n\n] - Incorrect key-value pair
{foo: [} - Correct JSON string
{"text": "The quick brown fox won\'t jump"} - Incorrect key-value pair
{"value_1": "value_2": "data"} - JSON string with comment
{"value_1": true, COMMENT "value_2": "data"} - JSON string with leading spaces
- { "test_key": ["test_value", "test_value2"] } - String containing a link
{ "content": "[LINK]("https://google.com")" } - Unclosed link string
{ "content": "[LINK](" } - Unclosed link and extra key string
{ "content": "[LINK](", "key": true } - Incorrect key-value pair
{"key":"",} - etc.