{"uid":"cap_CyORKgO9mmpn6ZHwCofSA","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-cfa0b42b","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-repair)","url":"https://cve-intel.agentdiet.dev/v1/json-repair?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_dPBHnbKD-0Q_C0pDiqsij","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 as broken JSON with trailing commas and markdown code fences — can you repair it into valid JSON so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My LLM just returned malformed JSON with trailing commas and it's crashing my pipeline — can you repair this string into valid JSON: {\"status\": \"ok\", \"results\": [1, 2, 3,]}"},{"title":"Strip markdown fences from JSON response","prompt":"The model wrapped its JSON output in markdown code fences and my parser is choking on it — please clean up and repair this: ```json\n{\"user\": 'Bob', \"score\": 95}\n```"},{"title":"Recover truncated JSON from timeout","prompt":"My agent timed out mid-generation and I got a truncated JSON object — can you deterministically repair this incomplete string so I can still extract the data: {\"order_id\": \"abc123\", \"items\": [{\"sku\": \"X1\", \"qty\":"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input, with syntax errors corrected, markdown fences stripped, trailing commas removed, and single quotes normalized to double quotes — ready for downstream parsing without crashes.","failureModes":["Input string is so corrupted that deterministic repair is impossible — returns error indicating unrecoverable JSON","Empty or whitespace-only raw_json input — returns validation error","Input is not JSON-like at all (e.g. plain prose) — repair may fail or return unexpected output","Payment not included or invalid — returns HTTP 402 requiring x402 payment","Network timeout or service unavailability — returns HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated pipelines — especially when you can't afford non-deterministic re-prompting or when the JSON is truncated, has markdown fences, trailing commas, or single quotes. Prefer this over re-prompting the LLM when latency and cost matter, or when the original model is no longer available to retry.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:35:59.342Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}