{"uid":"cap_pPUSHKd7d33vVmkjH1-Me","slug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-3e2f4892","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-normalizer)","url":"https://arxiv-digest.agentdiet.dev/v1/json-normalizer?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_pqWYgMta1LSIKPRtOz55Z","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 malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, markdown fences) so multi-agent pipelines receive valid, parseable JSON","exampleAgentPrompt":"Fix this broken JSON from the LLM output — it has trailing commas and markdown fences wrapping it: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Repair LLM output for structured extraction","prompt":"The LLM returned this JSON with single quotes and a trailing comma that's breaking my parser — can you clean it up? {'name': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from agent response","prompt":"My agent returned its JSON wrapped in triple backtick markdown fences and my downstream tool can't parse it — please repair and return clean JSON: ```json {\"status\": \"ok\", \"count\": 5} ```"},{"title":"Fix truncated JSON in pipeline","prompt":"This JSON got cut off mid-stream and is breaking my multi-agent workflow — can you repair it and give me valid JSON back? {\"results\": [\"a\", \"b\", \"c\""}],"resultDescription":"A JSON object containing the repaired, fully valid JSON — with trailing commas removed, markdown fences stripped, single quotes replaced with double quotes, and any truncation fixed — ready for downstream parsing and use in agent pipelines.","failureModes":["Input JSON too severely malformed to deterministically repair (ambiguous structure) — returns error or best-effort result","Empty or missing raw_json parameter — returns 400-level validation error","JSON that is structurally ambiguous after truncation (e.g. missing closing brackets with multiple possible interpretations) — repair may be incorrect","Non-JSON input passed as raw_json — may return error or pass-through"],"whenToPreferThis":"Choose this endpoint when LLM or agent outputs produce malformed JSON that crashes downstream parsers — especially when dealing with trailing commas, single-quoted keys/values, markdown-fenced output, or truncated streams in multi-agent pipelines. Prefer over manual regex heuristics or custom parsers when you need deterministic, consistent repair without writing and maintaining your own sanitization logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:42.647Z","isFirstParty":false,"canonicalSlug":"arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-859b9028"}