mrkeyoor.com_
Mon 02 Nov 01:09 UTC
AI Toolsevaluationupdated 01 Nov 2026

json_repair review

Use json_repair when a Python application can recover malformed JSON and then validate the result before acting on it. json_repair repairs malformed JSON in Python. Its default path tries the standard JSON loader before applying repair heuristics. Our run on September 27, 2026, at commit 8d124ec installed and built successfully, but the test command failed. That supports a trial with your own malformed inputs, rather than an unconditional recommendation.

+2stars / 7d
Verdict

Trial json_repair 0.63.5 as a recovery step before application validation. Our September 27, 2026 run at commit 8d124ec installed and built successfully, but schema-focused failures prevented a passing test result. Keep the default JSON-loader check, test your own malformed inputs, and verify schema repair separately if you need it. Choose jsonrepair for Node.js streaming integration or JSON5 for deliberately handwritten JSON5 configuration.

We ran it

Lab card: what happened when we ran json_repairScreenshot of json_repair (mangiucugna.github.io/json_repair)
Install✓ · 29s36 packages · 37 MB
Build✓ · 5s
Tests✗ · 10s238 passed · 6 failed · 92 skipped of 244 (pytest)
Known vulns0(pip-audit)
Repo87 files~10,059 lines of source · 3.2 MB · 6 CI workflows · tests dir

Answers from our run

Does json_repair build from source?

Dependencies installed in 29 seconds (36 packages), and the build succeeded in 5 seconds. We cloned commit 8d124ec into a clean Debian container with 3 CPUs and no project-specific setup.

Do json_repair's tests pass?

No. The project's own test command finished in 10 seconds and reported 238 passed, 6 failed, 92 skipped (pytest).

Does json_repair have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use json_repair?

Workflows that must reject ambiguous values rather than infer replacements.

What are the alternatives to json_repair?

jsonrepair, JSON5. Trial json_repair 0.

Setup3/5Our recorded install and build succeeded, but the test command failed with six listed schema-focused failures requiring jsonschema.
Docs5/5The tested README explains default parsing, repair warnings, schema beta status, strict-mode restrictions and CLI options; this assesses documentation coverage.
Community4/5The supplied release and completed issue show maintenance responsiveness; contributor breadth, adoption and support availability were not measured.
Maturity4/5The core parser has documented behavior and targeted release fixes, while schema repair remains beta and our recorded test command failed.

Who it’s for

Python developers receiving malformed JSON from models, APIs, logs or user input.
Teams that can check repaired values against application rules before accepting them.
Developers willing to retain malformed examples as regression fixtures and decide which repairs are acceptable.

Who it’s NOT for

Workflows that must reject ambiguous values rather than infer replacements.
Teams requiring demonstrated schema-repair reliability from our run: its schema-focused failures remain unresolved in the recorded environment.
Applications expecting syntax recovery to establish the sender's intended meaning.
Producers that deliberately use JSON5 for handwritten configuration and need a parser for that format.

Setup reality

Our sandbox run was recorded on September 27, 2026, at commit 8d124ec for json_repair 0.63.5. Installation returned exit 0 in 29 seconds, with 36 packages and a 37 MB footprint; the build returned exit 0 in 5 seconds. The test command returned exit 1 after 10 seconds.

The attached stored parser summaries report 238 passed, 6 failed, 244 in the passed-plus-failed total, and 92 skipped. These summaries do not establish exhaustive unique test coverage. The raw pytest footer separately reports 6 failed, 238 passed and 92 skipped in 2.78 seconds. Its suite duration differs from the harness command duration; neither replaces the other.

All six listed failures report that jsonschema is required for schema-aware repair. The supplied README documents the optional schema installation, but this record contains no successful rerun with that extra. pip-audit recorded 0 advisories; scan coverage is unknown because no scannedPackages value is supplied. This was not a security review or a CLI deployment test.

Should you use json_repair?

Choose it when rejecting malformed JSON would discard useful input and your application can check the recovered values. json_repair repairs malformed JSON in Python. The documented repairs include missing quotes, commas and brackets, plus truncated values. Those repairs can make input parseable without proving that its values are correct.

Our run on September 27, 2026, at commit 8d124ec installed and built successfully, but the test command failed. The practical next step is to test your own malformed samples, including examples that should be rejected, before adding repair to an ingestion path.

What our sandbox established

The recorded environment used the Python 3.12 Bookworm image with 3 CPUs and 8 GB RAM. Installation took 29 seconds and the build took 5 seconds, both returning exit 0. The test command returned exit 1 after 10 seconds.

The harness stores each command's outcome, exit code, elapsed time and timeout flag alongside parsed test summaries and log tails. The attached stored parser summaries report 238 passed, 6 failed and 92 skipped, with 244 as the passed-plus-failed total. These are parser summaries, not verified exhaustive counts of unique tests. Skipped tests are not failures.

The raw pytest footer separately says "6 failed, 238 passed, 92 skipped in 2.78s". The 2.78 seconds belongs to that footer; the harness records 10 seconds for the command. Repeated failure lines in the supplied tail are not additional failures.

The six named failures cover schema-guided parsing, array and object schema paths, and missing-value or union repair. Every listed failure ends with the message "jsonschema is required when using schema-aware repair." The record establishes that these cases failed in our environment. It does not establish a successful schema-extra installation or what a rerun would produce.

The audit recorded 0 advisories. Scan coverage is unknown because the record does not supply scannedPackages; the dependency count cannot fill that gap. This result does not establish security. Nor do successful installation and build commands establish CLI behavior, application deployment, repair accuracy on production traffic or runtime throughput. We performed no new execution for this correction.

The MrKeyoor testing methodology explains how command outcomes and parsed summaries reach our reviews. That page describes the publisher's methodology; it does not establish that this September run used its later October revision.

Keep valid input on the default path

The README at the tested commit says the default path tries the standard-library JSON loader and invokes the repair parser only when strict JSON parsing fails. Keep that path for traffic containing both valid and malformed JSON.

The documented skip_json_loads option bypasses that check. The README warns that sending valid JSON directly through the repair parser can change structure or values. Use it only when input is already known to be invalid, rather than treating it as an equivalent performance switch.

Repair also needs an acceptance policy. Check required fields, allowed values and business rules after recovery. For a payment amount or permission change, a parseable result alone is insufficient grounds to act.

Treat schema repair as a separate adoption decision

The tested README labels schema-guided repair beta and says bugs are expected. It documents an optional schema extra and guidance from JSON Schema or a Pydantic v2 model. Schema guidance can fill missing values, coerce scalars and drop properties or items that the schema disallows. Those operations can change the data you retain.

Strict mode instead raises errors for structural problems such as duplicate keys and missing separators. Schema guidance and strict mode are mutually exclusive. Decide whether a particular input path permits recovery or requires rejection, then test that policy explicitly. Our failed schema cases leave that feature unverified in the recorded environment.

Which alternatives fit different inputs?

jsonrepair provides a streaming API for Node.js. Consider it as a replacement for the repair layer when your application needs Node.js stream integration. Its README also documents a buffer constraint: the buffer must accommodate the largest string and whitespace in the input. Streaming support alone does not remove that operational limit.

JSON5 is intended for handwritten configuration rather than machine-to-machine communication. Choose its parser when the producer deliberately writes JSON5 syntax, including comments or trailing commas. It defines an accepted input format; it does not serve the same purpose as recovering arbitrary damaged model output.

Validation remains a complementary step whichever repair implementation you choose. A parser's successful output does not establish your application's acceptance rules.

How to read the scores

These editorial scores use a five-point rubric: 1 means substantial obstacles, 2 means material limitations, 3 means usable with a demonstrated caveat, 4 means strong evidence within a limited scope, and 5 means thorough coverage of the assessed area. They are judgments, not benchmarks or adoption measurements.

Setup ease is 3 because installation and build succeeded while schema-focused tests failed. Documentation is 5 for its explicit defaults, warnings, mode restrictions and CLI descriptions, not for independently verified behavior of every example. Community is 4 narrowly for visible maintenance evidence: the supplied 0.63.5 release lists fixes for positive exponents and numeric-prefix identifiers, and issue 230 records completion. It does not measure contributor breadth or support availability. Maturity is 4 for the documented core parser and targeted fixes, qualified by beta schema repair and our failed test command.

Alternatives

ProjectWhat it isPick it when
jsonrepairA JSON repair library with a Node.js streaming API.Choose it as a replacement repair layer when Node.js stream integration fits your application; check its documented buffer constraints.
JSON5A parser and serializer for a JSON superset intended for handwritten configuration.Choose it when producers deliberately write JSON5. Its stated purpose excludes machine-to-machine communication, so it is a different input contract from malformed-output recovery.

Sources

  1. json_repair README
  2. json_repair v0.63.5 release
  3. Issue 230: positive exponents truncated during repair
  4. Issue 231: numeric-prefix identifiers lose characters
  5. json_repair live documentation

More ai tools reviews

kornia · skills · anarlog · pr-agent · agent-sprite-forge · KiroCrew · the whole board →