json-repair  by RealAlexandreAI

JSON repair tool for LLM outputs

created 1 year ago
271 stars

Top 95.8% on sourcepulse

GitHubView on GitHub
Project Summary

This Go library and CLI tool, json-repair, addresses the common problem of malformed JSON output generated by Large Language Models (LLMs). It provides a robust solution for developers and data engineers who need to reliably parse and process this often-unpredictable data, saving significant debugging time.

How It Works

The library intelligently detects and corrects a wide array of JSON syntax and structural errors. It handles issues like single quotes, line feeds, unclosed arrays/objects, incorrect key-value pairs, and even comments within JSON strings. Its zero-dependency design ensures easy integration into existing Go projects and minimal overhead.

Quick Start & Requirements

  • Install: go get github.com/RealAlexandreAI/json-repair
  • CLI Install: brew install realalexandreai/tap-jsonrepair/jsonrepair
  • Prerequisites: Go toolchain.
  • Usage: Refer to the Online Playground or Test Cases.

Highlighted Details

  • Supports numerous LLM-generated JSON anomalies.
  • Offers a zero-dependency Go library and a CLI tool.
  • Includes a comprehensive test suite for reliability.
  • Auto-detects and repairs a broad spectrum of JSON errors.

Maintenance & Community

The project is open-source and welcomes contributions. A roadmap is available, with some features already implemented.

Licensing & Compatibility

Distributed under the GPLv3 License. This copyleft license may have implications for use in closed-source commercial applications.

Limitations & Caveats

The GPLv3 license may restrict commercial use in proprietary software without adherence to its terms.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
32 stars in the last 90 days

Explore Similar Projects

Starred by Philipp Schmid Philipp Schmid(DevRel at Google DeepMind) and Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake).

json_repair by mangiucugna

1.1%
3k
JSON repair tool for LLM outputs
created 1 year ago
updated 1 week ago
Feedback? Help us improve.