{"uid":"cap__imTkiOtejnLrkse01c_p","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e2ef9a6f","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)","url":"https://json-repair.agentdiet.dev/v1?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_uIXoiqGhH_ckPB-niUJ6M","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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.","exampleAgentPrompt":"This LLM response came back with broken JSON — trailing commas, markdown code fences, and single quotes everywhere. Can you repair it so I can parse it? Here's the raw string: ```{name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream parsing","prompt":"The model just returned this JSON with a trailing comma and wrapped in markdown fences — it's crashing my parser. Can you clean it up and give me valid JSON back? Here's the raw output: ```json\n{\"name\": \"Alice\", \"score\": 42,}\n```"},{"title":"Recover truncated agent response JSON","prompt":"My agent pipeline got a truncated JSON response mid-stream and now nothing downstream can parse it. Can you repair this broken string and return something valid? Here it is: {\"items\": [{\"id\": 1, \"value\": \"foo\"}, {\"id\": 2"},{"title":"Sanitize single-quoted JSON from legacy tool","prompt":"I'm getting JSON back from an older tool that uses single quotes instead of double quotes and it's breaking everything. Can you fix this so it's proper valid JSON? Here's the string: {'user': 'bob', 'active': True}"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input — with markdown fences stripped, trailing commas removed, single quotes converted to double quotes, truncated structures closed, and any other deterministic fixes applied to make it parseable.","failureModes":["Input JSON is so severely malformed that deterministic repair is impossible and the endpoint returns an error or best-effort partial result","Empty or whitespace-only raw_json input triggers a validation error","Extremely long JSON strings may hit query parameter length limits since input is passed as a GET query parameter","Network or payment (x402) authentication failures return 402 or 5xx errors"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than probabilistic LLM-based rewriting — ideal for multi-agent pipelines where predictability and low latency matter. Prefer it over manually writing repair logic when handling common LLM output artifacts like markdown fences, trailing commas, and single quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:15.252Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}