{"uid":"cap_AGyLfwjFrmikrb0wkZ7CQ","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b05c66e4","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://x402-audit.agentdiet.dev/v1/json-repair)","url":"https://x402-audit.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_71MVTOkeSkuHxFIzSWSsn","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402-audit.agentdiet.dev","brandSlug":"x402-audit-agentdiet-dev-mpp","brandBaseUrl":"https://x402-audit.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 JSON came back from the LLM and it won't parse — there are trailing commas, single quotes, and a markdown code fence wrapping it. Can you run it through the JSON repair service and give me a clean, valid object I can use?","exampleUseCases":[{"title":"LLM pipeline JSON crash prevention","prompt":"The structured output from my last agent step has trailing commas and is wrapped in a ```json markdown block — it's breaking my downstream parser. Can you repair it so it's clean, valid JSON I can feed into the next step?"},{"title":"Single-quote JSON fix for agent workflow","prompt":"My LLM returned JSON using single quotes instead of double quotes and some missing brackets. Fix it so it's valid JSON before I pass it to the next agent in the pipeline."},{"title":"Truncated API response recovery","prompt":"I got a truncated JSON response that got cut off mid-string and has unclosed braces. Can you repair it deterministically and return whatever valid JSON can be recovered?"}],"resultDescription":"Returns a repaired, valid JSON object parsed from the malformed input. The response contains the cleaned JSON with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes normalized to double quotes, and truncated structures closed where possible.","failureModes":["Input is so corrupted that no valid JSON can be recovered — returns error with details","Input JSON is empty or null — returns 400 validation error","Payment not completed via x402 — returns HTTP 402 Payment Required","Idempotency-Key collision with different payload — may return cached prior result","Input exceeds size limits — returns 413 or similar error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or markdown-wrapped JSON from an LLM and needs a deterministic, paid-per-call repair service rather than a local library. Ideal for production agentic workflows where reliability matters and you want a battle-tested remote repair service with x402 micropayment support, especially if you're already using the agentdiet.dev B2A hub for other capabilities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T00:35:45.262Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}