{"slug":"x402-fenixfoundry-com-repair-json-9469ef","title":"Repair malformed JSON (trailing commas, single quotes, unquoted keys, code fence","host":"x402.fenixfoundry.com","method":"POST","resource":"https://x402.fenixfoundry.com/repair-json","category":"code","description":"Repair malformed JSON (trailing commas, single quotes, unquoted keys, code fences, truncated output) and optionally validate the result against a supplied JSON Schema. Returns the parsed value, the canonical text, a change log and validation errors.","price_listed":0.003,"price_asked":0.003,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":18,"reported_calls_30d":5,"reported_payers_30d":3,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"input":"```json\n{name: \"ada\", tags: [\"math\", \"code\",]}\n```","schema":{"properties":{"name":{"type":"string"},"tags":{"type":"array"}},"required":["name"],"type":"object"}},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"input":{"description":"Malformed JSON text — trailing commas, single quotes, unquoted keys, markdown code fences, truncated output, etc.","type":"string"},"schema":{"description":"Optional JSON Schema (draft 2020-12) to validate the repaired value against.","type":"object"}},"required":["input"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"changed":{"type":"boolean"},"changes":{"items":{"type":"string"},"type":"array"},"errors":{"items":{"type":"object"},"type":"array"},"repaired":{},"repairedText":{"type":"string"},"valid":{"type":"boolean"}},"required":["repaired","repairedText","changes"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":18,"error":null}],"description_full":"Repair malformed JSON (trailing commas, single quotes, unquoted keys, code fences, truncated output) and optionally validate the result against a supplied JSON Schema. Returns the parsed value, the canonical text, a change log and validation errors.","last_updated":"2026-09-11T03:37:59.848Z","schemes":["exact"]}