{"uid":"cap_TQfbGIRdpePONn81KPkkA","slug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-c0a16aff","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://onchain-risk.agentdiet.dev/v1/malformed-json-healer)","url":"https://onchain-risk.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_bFRHQENDXr_NBo7Py5HOM","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"onchain-risk.agentdiet.dev","brandSlug":"onchain-risk-agentdiet-dev-mpp","brandBaseUrl":"https://onchain-risk.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid, parseable JSON deterministically.","exampleAgentPrompt":"This JSON string from our LLM has trailing commas and markdown fences and it's crashing our pipeline — can you repair it into valid JSON? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix crashed LLM pipeline JSON","prompt":"Our language model returned this malformed JSON with trailing commas and it's breaking our downstream parser — can you clean it up and give me valid JSON? The raw output is: {\"status\": \"ok\", \"results\": [1, 2, 3,],}"},{"title":"Strip markdown fences from agent response","prompt":"My AI agent wrapped its JSON output in triple backtick markdown fences and now I can't parse it programmatically — can you repair this into plain valid JSON: ```json\n{\"user\": \"bob\", \"score\": 42}\n```"},{"title":"Repair single-quoted JSON from scraper","prompt":"I got this JSON-like string back from a scraper but it uses single quotes instead of double quotes and has a missing closing bracket — can you fix it into proper JSON? Here it is: {'name': 'widget', 'price': 9.99"}],"resultDescription":"A JSON object containing the deterministically repaired, valid JSON — free of trailing commas, markdown fences, single-quote issues, and truncation artifacts, ready to parse without errors.","failureModes":["Input JSON is so severely malformed that repair is ambiguous or impossible — returns error","Raw input string is empty or whitespace — returns validation error","JSON structure is too deeply truncated to infer correct closing — may return partial or error","Network/payment failure results in HTTP 402 or 5xx response"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated pipelines — especially when the malformation patterns are known (trailing commas, markdown fences, single quotes, truncation). Prefer it over LLM-based re-generation when you need reproducible, fast, low-cost fixes without hallucination risk.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:59.744Z","isFirstParty":false,"canonicalSlug":"onchain-risk-agentdiet-dev-deterministic-a2a-broken-json-repair-2ee0e1c0"}