{"uid":"cap_oSMvk_NwDgDPzHqliN0sH","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8c928d79","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":"POST","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_HwA25ncXwb39I-T2soHNG","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":"Deterministically repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fence blocks) so multi-agent pipelines can process them without crashing.","exampleAgentPrompt":"This JSON string came back from our LLM step and it's broken — it has trailing commas, markdown code fences, and single-quoted keys. Can you run it through the JSON normalizer to get back a clean, valid JSON object? Here it is: ```json\\n{'name': 'Alice', 'score': 42,}\\n```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The language model returned this JSON but it's wrapped in markdown backticks and has a trailing comma — fix it so the next agent in my pipeline can parse it without crashing: ```json\\n{\"status\": \"ok\", \"items\": [1,2,3,],}\\n```"},{"title":"Repair truncated API response JSON","prompt":"My LLM got cut off mid-response and the JSON is incomplete — can you repair this truncated JSON string so it's valid and parseable? Here's what came back: {\"user\": \"bob\", \"preferences\": {\"theme\": \"dark\""},{"title":"Normalize single-quoted JSON from agent output","prompt":"One of my sub-agents returned JSON using single quotes instead of double quotes and it's breaking my parser — please normalize this to valid JSON: {'id': 123, 'active': true, 'tags': ['ai', 'agent']}"}],"resultDescription":"A JSON object containing the repaired, normalized, and valid JSON — ready for downstream parsing. The response resolves structural issues such as trailing commas, markdown fences, single-quoted keys/values, and truncated structures, returning well-formed JSON that multi-agent pipelines can safely consume.","failureModes":["Input is so severely malformed that deterministic repair is impossible, returning an error","Input string is empty or not provided (minLength:1 enforced)","JSON is ambiguous enough that multiple valid repairs exist, potentially returning an unexpected structure","Network timeout or service unavailability at the x402 endpoint"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than an LLM-based re-generation — it is predictable, cheap ($0.002/call), and safe for high-throughput multi-agent pipelines where LLM re-inference would be too slow or expensive. Prefer it when the malformation is structural (trailing commas, markdown fences, single quotes, truncation) rather than semantic. It also supports idempotent retries via an Idempotency-Key header, making it reliable in retry loops.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:31:18.455Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}