Repair malformed JSON text into valid parsed JSON
keyronne.com/api/json-repair
Repair malformed JSON text into valid parsed JSON: markdown code fences, single quotes, smart quotes, unquoted keys, trailing commas, comments, Python literals (True/None), raw newlines in strings, and truncated output (auto-closes strings, arrays and objects). Returns the parsed value plus a log of every repair applied. Built for LLM output that almost parses. POST a JSON body like: {"text":"```j
POST
https://keyronne.com/api/json-repairUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://keyronne.com/api/json-repair", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"text":"```json\n{name: 'Ada', age: 36, tags: ['x',], active: True"}),
});
console.log(await res.json());Example input
{
"text": "```json\n{name: 'Ada', age: 36, tags: ['x',], active: True"
}