J

JSON Repair · Json Repair

by JSON Repair

POSTBase

$0.001

per call · USD Coin on Base

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":"```json\n{name: 'Ada', age: 36, tags: ['x',], active: True"}

Endpoint

POST https://keyronne.com/api/json-repair

14

Calls / 30d

11

Unique payers / 30d

Sep 9

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("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"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://keyronne.com/api/json-repair" \
  -H "Content-Type: application/json" \
  -d '{"text":"```json\n{name: 'Ada', age: 36, tags: ['x',], active: True"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "repairs": [
    "removed markdown code fence",
    "quoted unquoted object key",
    "converted single-quoted string to double quotes",
    "removed trailing comma",
    "normalized True to true",
    "closed unbalanced object (input looks truncated)"
  ],
  "value": {
    "active": true,
    "age": 36,
    "name": "Ada",
    "tags": [
      "x"
    ]
  }
}

Payment details

Pay to0xb86f95ef5fa904318ea9df3b59adce099b478fc4
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from JSON Repair & similar services