80trust / 100

Json Repair

by NetIntel in AI models & inference

x402 APIPassing, checked 21 min ago

Repair malformed JSON into valid JSON — fixes code fences, trailing commas, single quotes, unquoted keys, bad escapes, duplicate keys, truncation, and JSON buried in prose. A deterministic tokenizer runs first (no LLM cost), with an optional Haiku fallback, plus optional schema validation and type coercion — so agents can rescue broken model output or dirty data in one call.

POST https://netintel.dev/json/repair

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
195 ms typical, 443 ms slowest 5%
Last check
21 min ago
Next check
in 12 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://netintel.dev/json/repair" \
  -H "content-type: application/json" \
  -d '{"input":"```json\n{'name': 'acme', 'ports': [80, 443,],}\n```"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fnetintel.dev%2Fjson%2Frepair
const res = await pay("https://netintel.dev/json/repair", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"input":"```json\n{'name': 'acme', 'ports': [80, 443,],}\n```"}),
});
console.log(await res.json());

Example input

{
  "input": "```json\n{'name': 'acme', 'ports': [80, 443,],}\n```"
}

Example output

{
  "changes": [
    "removed markdown code fences",
    "converted 3 single-quoted strings to double-quoted",
    "removed 2 trailing commas"
  ],
  "confidence": 1,
  "findings": [],
  "grade": "A",
  "method": "deterministic",
  "repair_succeeded": true,
  "repaired": {
    "name": "acme",
    "ports": [
      80,
      443
    ]
  },
  "schema_valid": null,
  "score": 100,
  "validation_errors": [],
  "warnings": [],
  "was_valid": false
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
21 min agoPassed402445 ms$0.02
4 h agoPassed402387 ms$0.02
8 h agoPassed402443 ms$0.02
11 h agoPassed402181 ms$0.02
15 h agoPassed402187 ms$0.02
18 h agoPassed402195 ms$0.02
23 h agoPassed402383 ms$0.02
26 h agoPassed402259 ms$0.02
29 h agoPassed402180 ms$0.02
34 h agoPassed402175 ms$0.02