Skip to content
Fourohtwo

Repairs broken JSON

api.sitecheck-api.workers.dev/api/json/repair

Repairs broken JSON: markdown fences, comments, trailing commas, single quotes, unquoted keys, Python literals (True, False, None) and truncated endings. Pure code first; the model is asked once only when code cannot repair it. Optional JSON Schema check covers type, required, properties, items, enum, minimum, maximum, minLength, maxLength and pattern. Input max 1 MB.

BaseSolanaArcPolygonArbitrumWorld Chain+1Answering
POSThttps://api.sitecheck-api.workers.dev/api/json/repair

Uptime100% of 2 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://api.sitecheck-api.workers.dev/api/json/repair", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"schema":{"required":["name"],"type":"object"},"text":"{'name': 'Ada', 'langs': ['en', 'fr',], // comment\n"}),
});
console.log(await res.json());

Example input

{
  "schema": {
    "required": [
      "name"
    ],
    "type": "object"
  },
  "text": "{'name': 'Ada', 'langs': ['en', 'fr',], // comment\n"
}

More from SiteCheckProvider status