{"uid":"cap_YVwIvgc8B_4BG2EBLQk5q","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-9acede47","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://x402-audit.agentdiet.dev/v1/json-normalizer)","url":"https://x402-audit.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_y8zGOdb79panIG0le_M_K","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402-audit.agentdiet.dev","brandSlug":"x402-audit-agentdiet-dev-mpp","brandBaseUrl":"https://x402-audit.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON to prevent multi-agent pipeline crashes.","exampleAgentPrompt":"This JSON string came back from my LLM and it's broken — it has trailing commas and markdown fences wrapping it. Can you repair it so it's valid JSON I can use? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI pipeline is crashing because the model keeps outputting JSON with trailing commas and sometimes wraps it in markdown code fences. Can you repair this so it parses correctly: ```json {\"status\": \"ok\", \"items\": [1, 2, 3,],} ```"},{"title":"Normalize single-quoted JSON response","prompt":"I got this JSON back from a tool call but it uses single quotes instead of double quotes and my parser is rejecting it. Fix it for me: {'user': 'bob', 'score': 95, 'active': true}"},{"title":"Recover truncated JSON from timeout","prompt":"My LLM timed out mid-generation and I got a truncated JSON object that's missing its closing brackets. Can you repair and complete this fragment so I can continue processing: {\"order_id\": \"XYZ123\", \"items\": [{\"sku\": \"A1\", \"qty\": 2}"}],"resultDescription":"Returns a repaired, valid JSON object with the malformed input corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed. The response is a JSON object that can be safely parsed and used downstream in agent workflows.","failureModes":["Input is so severely malformed that deterministic repair is ambiguous — endpoint may return an error or best-effort result","Very large truncated JSON strings may have incomplete context making repair impossible","Non-JSON content passed as raw_json (e.g. plain text) cannot be meaningfully repaired","GET query parameter length limits may prevent passing extremely long malformed JSON strings"],"whenToPreferThis":"Choose this endpoint when an AI agent pipeline is receiving malformed JSON from LLM outputs and needs a deterministic, reproducible fix — not a probabilistic re-generation. Prefer this over asking the LLM to re-generate JSON when you need consistent, rule-based repair of known JSON malformation patterns (trailing commas, markdown fences, single quotes, truncation). Ideal for production multi-agent systems where pipeline reliability is critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:17.515Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}