{"uid":"cap_0JCmCBdskF4_XVes8_Scd","slug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-93290103","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-validator)","url":"https://cve-intel.agentdiet.dev/v1/json-validator?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_TsrbIb5eEuQJNLNVnunKn","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) into valid JSON so multi-agent pipelines never crash.","exampleAgentPrompt":"This JSON came back from an LLM and it won't parse — it has trailing commas, single quotes around keys, and markdown code fences. Can you repair it and give me back valid JSON? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My agent just got this JSON back from a language model and the pipeline crashed because it has trailing commas and markdown fences. Can you repair it so I can pass it downstream? Here's the raw output: ```json\n{\"user\": \"bob\", \"score\": 42,}\n```"},{"title":"Sanitize single-quoted JSON keys","prompt":"I have a JSON string where all the keys are wrapped in single quotes instead of double quotes — it was generated by an LLM and my parser rejects it. Can you fix this for me: {'product': 'widget', 'price': 9.99}"},{"title":"Recover truncated JSON from streaming LLM","prompt":"My streaming LLM response got cut off mid-output and the JSON is incomplete — it stops at {\"items\": [{\"id\": 1, \"name\": \"foo\". Can you repair and complete this truncated JSON so I can use it?"}],"resultDescription":"Returns a JSON object containing the repaired, valid JSON string that has been cleaned of markdown fences, trailing commas, single-quoted keys, and other common LLM-induced malformations — ready to be parsed and passed to downstream pipeline steps.","failureModes":["JSON is too severely truncated to reconstruct meaningfully — returns error or best-effort partial repair","Input is not recognizably JSON at all — endpoint may return error or pass-through","Ambiguous repair cases where multiple valid interpretations exist may produce unexpected output","Payment required error (HTTP 402) if x402 micropayment not included"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs — particularly when dealing with trailing commas, markdown code fences, single-quoted keys, or truncated strings in a multi-agent or automated pipeline. Prefer this over manual string manipulation when reliability and consistency matter at scale, and over LLM-based repair when you need fast, predictable, non-generative correction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:44:46.898Z","isFirstParty":false,"canonicalSlug":"cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471"}