{"uid":"cap_T_jro0PF4e-U6lyd44EZr","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-4cf141d4","name":"Deterministic A2A Broken-JSON Repair & Schema Validator","description":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://json-repair.agentdiet.dev/v1/malformed-json-healer)","url":"https://json-repair.agentdiet.dev/v1/malformed-json-healer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"raw_json":{"type":"string","minLength":1,"description":"Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.002","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dRE65q89QmwH1bndNsifu","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"json-repair.agentdiet.dev","brandSlug":"json-repair-agentdiet-dev-mpp","brandBaseUrl":"https://json-repair.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, fenced code blocks) so multi-agent pipelines never crash on bad LLM output.","exampleAgentPrompt":"This LLM response came back with trailing commas and markdown code fences around the JSON — can you clean it up and give me valid, parseable JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream step","prompt":"The language model returned a JSON block wrapped in triple backticks with a trailing comma on the last field — repair it so I can pass it to the next agent in my pipeline: ```{\"status\": \"ok\", \"count\": 42,}```"},{"title":"Recover truncated JSON from partial response","prompt":"My LLM call got cut off mid-response and the JSON is truncated — it ends abruptly without closing brackets. Can you deterministically repair this so it's valid JSON I can parse? Here's what I got: {\"user\": {\"id\": 99, \"name\": \"Bob\""},{"title":"Sanitize single-quoted agent output","prompt":"An agent in my workflow returned JSON using single quotes instead of double quotes, like {'key': 'value', 'active': true} — can you fix it to valid JSON so my downstream parser doesn't throw an error?"}],"resultDescription":"A repaired, valid JSON object derived from the malformed input string. The endpoint deterministically corrects issues such as trailing commas, missing brackets, markdown fences, single quotes, and truncation, returning a well-formed JSON payload ready for downstream parsing or schema validation.","failureModes":["Input so severely malformed that no deterministic repair is possible — returns error or best-effort partial result","Ambiguous truncation where the intended structure cannot be inferred — may produce incorrect but syntactically valid JSON","Very large JSON strings may hit query parameter length limits when passed via GET","Empty or whitespace-only raw_json input — likely returns validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common formatting issues like trailing commas, markdown fences, single quotes, or truncation. It is purpose-built for deterministic (non-probabilistic) repair, making it reliable for automated pipelines where consistency matters. Prefer it over ad-hoc regex fixes or re-prompting the LLM when you need a fast, cheap, and predictable correction step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:46:07.860Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}