{"uid":"cap_UhFsRv1EBg5-axYQt4QvX","slug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-d0f499ac","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://llms-generator.agentdiet.dev/v1/json-normalizer)","url":"https://llms-generator.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_2SweRZ1T4Wf2JdIFUdiM-","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"llms-generator.agentdiet.dev","brandSlug":"llms-generator-agentdiet-dev-mpp","brandBaseUrl":"https://llms-generator.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON came back from my LLM and it's broken — it has trailing commas and markdown fences wrapping it. Can you repair it into valid JSON? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before pipeline handoff","prompt":"My language model returned this malformed JSON with a trailing comma and I need to pass it to the next step in my agent pipeline — can you clean it up so it parses correctly? Here's the raw output: {\"status\": \"ok\", \"items\": [\"a\", \"b\",]}"},{"title":"Strip markdown fences from AI-generated JSON","prompt":"The AI wrapped its JSON response in triple backtick markdown fences and now my parser is crashing. Can you strip those out and give me clean, valid JSON? Raw string is: ```json\n{\"user\": \"bob\", \"score\": 42}\n```"},{"title":"Repair single-quoted JSON from agent response","prompt":"I got this JSON back from an agent that used single quotes instead of double quotes and it's invalid. Please fix it to proper JSON format: {'product': 'widget', 'price': 9.99}"}],"resultDescription":"A repaired, valid JSON object returned as a structured response. The endpoint deterministically fixes common malformations including trailing commas, markdown code fences, single-quoted keys/values, and truncated structures, returning a clean parseable JSON payload.","failureModes":["Input JSON is so severely truncated or corrupted that deterministic repair is impossible — returns error","Ambiguous structure where repair would change semantics — may return best-effort result or error","Empty or non-JSON input string — returns validation error","Network timeout or service unavailability — returns HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair without LLM inference — ideal for multi-agent pipelines where consistency and predictability are critical. Prefer this over LLM-based repair when you need guaranteed behavior on specific malformation patterns (trailing commas, markdown fences, single quotes) and cannot afford non-deterministic outputs. Best suited for automated pipelines that process high volumes of LLM-generated JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:37.429Z","isFirstParty":false,"canonicalSlug":"llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-76e2e18d"}