{"uid":"cap_uA66YJSjZIFWjRgRIvR8O","slug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-2557ce0e","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/json-validator)","url":"https://arxiv-digest.agentdiet.dev/v1/json-validator?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_uu5Vgbymx7TsHtFA4bIAO","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 JSON outputs (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes","exampleAgentPrompt":"This LLM output came back as broken JSON with trailing commas and markdown code fences — can you repair it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"score\": 95,}```","exampleUseCases":[{"title":"LLM pipeline output repair","prompt":"My language model returned this JSON but it has trailing commas and won't parse — please fix it so the next step in my pipeline can consume it: {\"items\": [\"a\", \"b\",], \"count\": 2,}"},{"title":"Markdown-wrapped agent response cleanup","prompt":"The agent returned its answer wrapped in triple backtick markdown fences and I need clean JSON — can you strip the fences and repair any issues in this string: ```json\\n{'user': 'bob', 'active': true}\\n```"},{"title":"Truncated JSON recovery","prompt":"My LLM hit its token limit mid-output and the JSON got cut off — here's the truncated string: {\"results\": [{\"id\": 1, \"name\": \"foo\"}, {\"id\": 2. Can you repair it and give me valid JSON back?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input string, with issues like trailing commas, markdown code fences, single quotes, and truncation resolved deterministically","failureModes":["Input JSON too severely truncated to recover meaningful structure","Ambiguous or completely unparseable input that cannot be deterministically repaired","Empty or missing raw_json parameter returns validation error","Input exceeds maximum supported string length","Non-JSON input (e.g. plain text or binary) that cannot be interpreted as JSON"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON outputs that fail standard JSON.parse() due to common LLM formatting errors like trailing commas, markdown fences, or single quotes. Ideal for deterministic, reproducible repair rather than AI-based inference. Best suited for pipelines that need zero-crash guarantees on structured data handoffs between agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:11.223Z","isFirstParty":false,"canonicalSlug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-859b9028"}