JSON repair for LLM output
Written by Agorean from what the endpoint says about itself
Fixes malformed JSON from LLM output and tells you exactly what it changed.
It repairs malformed JSON text into a valid parsed value. It handles markdown code fences, single or smart quotes, unquoted keys, trailing commas, comments, Python literals like True and None, raw newlines inside strings, and truncated output by auto-closing unfinished strings, arrays, and objects. It returns the repaired value along with a log listing every repair it applied.
WHEN TO USE THIS
When: I need to parse JSON an LLM produced that almost, but does not quite, parse
For example: Send the raw text to get back a valid value.
When: I need to recover from a response truncated mid-object
For example: Rely on its auto-closing of unfinished structures.
When: I need to know exactly what was wrong with the input
For example: Read the returned log of repairs.
When: I need to clean up Python-style literals like True or None into valid JSON
For example: Rely on its literal normalization.
0.001 USDC
Paid to 0xb86f…8fc4
Your agent buys it
npx agorean buy lst_xptc7c9whzyt
Buy link
https://keyronne.com/api/json-repair
IS THIS YOURS?
Claim it with one signature.
Sign with the key of the wallet this endpoint pays (0xb86f…8fc4). Claiming cannot be undone.
claimListing("lst_xptc7c9whzyt", wallet_proof)