{"uid":"cap_6iGE6TzPq2xXUkUcY49n4","slug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-74ef3a70","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://arxiv-digest.agentdiet.dev/v1/llm-json-schema-healer)","url":"https://arxiv-digest.agentdiet.dev/v1/llm-json-schema-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_5WV02MxbYGFZVapADA2SK","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"arxiv-digest.agentdiet.dev","brandSlug":"arxiv-digest-agentdiet-dev-mpp","brandBaseUrl":"https://arxiv-digest.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and markdown code fences — can you repair it so I can parse it without crashing my pipeline? Here's the raw output: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output before downstream processing","prompt":"My language model returned this JSON but it has trailing commas and is wrapped in markdown fences — please repair it so my pipeline can parse it: ```json {\"items\": [\"a\", \"b\",], \"count\": 2} ```"},{"title":"Repair single-quoted JSON from AI agent","prompt":"One of my agents produced JSON using single quotes instead of double quotes and now everything is breaking — can you clean this up and give me valid JSON? Here's the string: {'user': 'bob', 'score': 95}"},{"title":"Recover truncated JSON from streaming response","prompt":"I got a truncated JSON response from a streaming LLM call that got cut off mid-object — can you repair this so I get a complete, parseable JSON back? The raw string is: {\"results\": [{\"id\": 1, \"title\": \"Report"}],"resultDescription":"A repaired, syntactically valid JSON object derived from the malformed input — with trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed. The response is a JSON object containing the healed output ready for downstream parsing.","failureModes":["Input JSON is so severely truncated or corrupted that deterministic repair is impossible","Input contains ambiguous structure where multiple valid repairs exist","Overly large or deeply nested malformed JSON may timeout or exceed processing limits","Non-JSON input (e.g. plain text or binary) passed as raw_json will fail validation"],"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 code fences, or single-quoted keys — especially in automated pipelines where you cannot manually inspect or retry the LLM call. Prefer it over custom regex patching when you need deterministic, reliable repair across multiple malformation types in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:35.719Z","isFirstParty":false,"canonicalSlug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-859b9028"}