{"uid":"cap_ndncVtZ_qcago4-dCzFem","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-83ea39cb","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_KIrFqAnUX8nleU8tH14D8","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":"Can you fix this broken JSON that my LLM just generated — it has trailing commas, single quotes, and a markdown code fence around it: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fix LLM output before downstream processing","prompt":"My language model returned this JSON with trailing commas and it's crashing my parser — can you repair it and give me back valid JSON? Here it is: {\"items\": [\"apple\", \"banana\",], \"count\": 2,}"},{"title":"Strip markdown fences from agent response","prompt":"My AI agent wrapped its JSON response in a markdown code block with triple backticks and now my pipeline can't parse it. Can you clean it up and return proper JSON? The raw output is: ```json\n{\"status\": \"ok\", \"result\": 42}\n```"},{"title":"Recover truncated JSON from long LLM run","prompt":"My LLM hit its token limit mid-response and the JSON got cut off — it's missing closing brackets and quotes. Can you deterministically repair this truncated JSON and return the best valid version? Here's the broken string: {\"user\": \"bob\", \"scores\": [10, 20, 30"}],"resultDescription":"Returns a repaired, valid JSON object reconstructed from the malformed or truncated input, with issues like trailing commas, markdown code fences, single quotes, and missing brackets corrected deterministically","failureModes":["Input is so severely malformed that no valid JSON can be inferred — may return a best-effort partial object","Input is an empty string or pure non-JSON content — returns error or empty object","Ambiguous truncation point leads to incorrect inference of missing values","Payment (x402) failure or insufficient funds blocks the request"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse — especially for trailing commas, single quotes, markdown fences, or truncation artifacts. Prefer it over custom regex heuristics when you need deterministic, consistent repair behavior at scale across many agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:41.832Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}