{"uid":"cap_hV2BZ80-9W-j9xvYQjiK6","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6c872ebd","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://cve-intel.agentdiet.dev/v1/json-normalizer)","url":"https://cve-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_az1r7NDK7xPIbpxvxq4ve","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"cve-intel.agentdiet.dev","brandSlug":"cve-intel-agentdiet-dev-mpp","brandBaseUrl":"https://cve-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"This LLM response came back with a trailing comma and markdown fences around the JSON — can you clean it up and give me valid JSON I can actually parse? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My agent just got this JSON back from an LLM but it has trailing commas and single quotes — it's crashing my pipeline. Can you repair it into valid JSON? Here's the raw string: {'name': 'Bob', 'score': 95,}"},{"title":"Stripping markdown fences before parsing","prompt":"The model wrapped its JSON response in a markdown code block and now my parser is failing. Can you strip the fences and normalize this into clean JSON: ```json\n{\"result\": \"ok\", \"count\": 42}\n```"},{"title":"Recovering truncated structured output","prompt":"This JSON got cut off mid-response and is incomplete — can you repair it so I get a valid parseable object? The truncated string is: {\"items\": [{\"id\": 1, \"label\": \"alpha\"}, {\"id\": 2"}],"resultDescription":"A repaired, valid JSON object that has had common LLM output issues fixed — including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing or schema validation.","failureModes":["Input is so severely malformed that deterministic repair is not possible — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json input — returns validation error for minLength constraint","JSON is actually valid already — passes through unchanged","Extremely long input may hit query string length limits since the parameter is passed via GET query"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair (not probabilistic LLM re-generation) for common LLM output corruption patterns like trailing commas, markdown fences, and single quotes. It is ideal for hardening multi-agent pipelines where you need reliable structured output without re-querying the upstream model. Prefer this over manual parsing hacks or asking the LLM to re-format when you need a consistent, low-latency fix that can be called programmatically.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:49.052Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}