{"uid":"cap_gTW77yFNrfIBUXT7AGxO2","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-aa8aa7be","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/structured-output)","url":"https://json-repair.agentdiet.dev/v1/structured-output?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_-d45p5AvHmEF9awmJILLu","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can process structured outputs without crashing.","exampleAgentPrompt":"This JSON came back from the LLM but it has trailing commas and markdown code fences and won't parse — can you repair it so I can use it? Here's the raw string: ```json {\"name\": \"Alice\", \"score\": 42,} ```","exampleUseCases":[{"title":"Fix LLM output in agentic pipeline","prompt":"The language model just returned this JSON but it has a trailing comma and won't parse — fix it so the downstream agent can continue: {\"user\": \"bob\", \"items\": [\"a\", \"b\",]}"},{"title":"Strip markdown fences from structured response","prompt":"My LLM wrapped its JSON response in triple-backtick markdown fences and now my parser is crashing. Can you clean this up and return valid JSON? Here's the raw output: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Repair single-quoted JSON from chatbot","prompt":"I got this back from a chatbot and it used single quotes instead of double quotes throughout — the JSON won't deserialize. Please repair it: {'name': 'product', 'price': 9.99, 'available': true}"}],"resultDescription":"A repaired, valid JSON object with malformed syntax corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed. The response is a JSON object ready for downstream parsing.","failureModes":["Input JSON too severely malformed to deterministically repair — ambiguous structure may yield unexpected output","Empty or whitespace-only raw_json input returns an error","JSON that is structurally valid but semantically incorrect is returned as-is without semantic correction","Very long truncated JSON may have ambiguous closing structure leading to partial or incorrect repair"],"whenToPreferThis":"Choose this endpoint when an AI agent or multi-agent pipeline receives LLM-generated JSON that fails to parse due to common syntax errors like trailing commas, markdown code fences, or single quotes. Ideal for real-time pipeline error recovery where crashing is unacceptable. Prefer this over manual regex heuristics or custom parsing logic when you need deterministic, reproducible repair with consistent behavior across all common LLM output failure modes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:07.046Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}