{"uid":"cap_tPGgq0fcl61WSyFo_HiJo","slug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-b98dd7be","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://x402broker.com/v1/json-fix)","url":"https://x402broker.com/v1/json-fix?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_Sem-Og2B6iTirvOY2gpkl","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402broker.com","brandSlug":"x402broker-com-mpp","brandBaseUrl":"https://x402broker.com","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"This JSON string I got from the LLM has trailing commas and markdown code fences wrapped around it — can you fix it so it parses cleanly? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The JSON my language model just returned has trailing commas and single quotes instead of double quotes — it's breaking my pipeline. Can you repair this string so it's valid JSON I can actually parse? Here it is: {'name': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from AI response","prompt":"My AI assistant wrapped its JSON output in triple backtick markdown fences and now my code can't parse it. Can you clean it up and give me back just the raw valid JSON? The string is: ```json\n{\"result\": \"ok\", \"value\": 99}\n```"},{"title":"Recover truncated JSON from partial response","prompt":"I got a cut-off JSON response from my model — it looks like it was truncated mid-object and the closing braces are missing. Can you try to repair and complete it so it's valid? Here's what I have: {\"items\": [{\"id\": 1, \"name\": \"widget\""}],"resultDescription":"Returns a JSON object containing the repaired, syntactically valid version of the input JSON string, ready for programmatic parsing without errors","failureModes":["Input JSON is too severely corrupted or truncated to deterministically reconstruct — returns error or best-effort partial result","Input string is not JSON-like at all — may return an error indicating unparseable input","Network timeout or service unavailability returns a non-200 HTTP response","Payment not processed (x402 flow failure) results in 402 response before repair is attempted"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common formatting errors like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for deterministic repair rather than probabilistic regeneration, making it ideal for production pipelines where reliability matters. Prefer this over asking the LLM to regenerate when latency, cost, or idempotency are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:44.602Z","isFirstParty":false,"canonicalSlug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8"}