json-repair
Basic Information
json-repair is a Go library and command line tool designed to detect and fix malformed JSON produced by large language models and other sources. It is intended for Go developers and operators who need to convert broken or loosely formatted LLM outputs into valid JSON for downstream processing. The project offers a drop-in package for Go projects plus a terminal CLI and standalone binaries, enabling use in scripts and pipelines. It emphasizes zero external dependencies, consistent string results rather than error propagation, and a comprehensive suite of test cases to handle common anomalies. The repository includes examples, an online playground, Homebrew tap support and release artifacts to simplify installation and integration into developer workflows.