{"uid":"cap_P-yKxjbBOvJr0V0xtrHVp","slug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-3e1bd633","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://sec-intel.agentdiet.dev/v1/json-normalizer)","url":"https://sec-intel.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__kw-toPdBlUZZDQLU-MgN","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"sec-intel.agentdiet.dev","brandSlug":"sec-intel-agentdiet-dev-mpp","brandBaseUrl":"https://sec-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON deterministically","exampleAgentPrompt":"This JSON from my LLM is broken — it has trailing commas and markdown code fences wrapping it. Can you repair it into valid JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream parsing","prompt":"My language model just returned this JSON blob with trailing commas and single quotes instead of double quotes — it's crashing my parser. Can you fix it into valid JSON? Here's what I got: {'name': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from agent response","prompt":"My agent wrapped its JSON output in triple-backtick markdown fences and now my pipeline can't parse it. Can you clean that up and give me the raw valid JSON? The string is: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Recover truncated JSON mid-pipeline","prompt":"I got a truncated JSON response mid-pipeline that cuts off before closing brackets — it starts with {\"results\": [{\"id\": 1, \"value\": \"foo\". Can you repair it into the most likely valid complete JSON so I can keep processing?"}],"resultDescription":"A repaired, valid JSON object that can be safely parsed by downstream systems, with malformed syntax (trailing commas, single quotes, markdown fences, truncation) corrected deterministically.","failureModes":["Input is so severely truncated or corrupted that no deterministic repair is possible","Input is not JSON-like at all (plain text, binary), returning an error","Ambiguous structure where multiple valid repairs exist and the service must choose one heuristically","Network or service timeout on large payloads"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, paid-per-call JSON repair service integrated into a multi-agent or MCP pipeline that needs guaranteed valid JSON output from LLMs. Prefer it over writing custom repair logic when you need reliability at scale and want to avoid crashing pipelines due to common LLM JSON formatting errors like trailing commas, markdown wrapping, or single quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:04.941Z","isFirstParty":false,"canonicalSlug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-01a54acc"}