{"uid":"cap_4R0_Rs7aePI6jzg2yV3bt","slug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-d000b1cc","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-validator)","url":"https://x402-audit.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_v_gXnuFsdgo7cOm20_kNW","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, malformed, or markdown-wrapped JSON strings (trailing commas, single quotes, fences) so multi-agent pipelines can safely continue processing without crashes.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas and markdown code fences — can you repair it so I can parse it properly: ```{\"name\": \"Alice\", \"score\": 42,}```?","exampleUseCases":[{"title":"Fixing LLM output before pipeline continues","prompt":"My language model just returned this malformed JSON with single quotes and a trailing comma — fix it so the next step in my pipeline doesn't crash: {'user': 'Bob', 'items': ['a', 'b',]}"},{"title":"Stripping markdown fences from agent response","prompt":"The agent returned its answer wrapped in triple-backtick markdown fences with extra commas inside — can you clean it up and give me valid parseable JSON? Here's the raw output: ```json\n{\"result\": \"ok\",}\n```"},{"title":"Recovering truncated JSON from a timeout","prompt":"My API call timed out mid-response and I got this truncated JSON fragment — try to repair it into something valid I can work with: {\"id\": 123, \"data\": {\"items\": [1, 2, 3"}],"resultDescription":"A JSON object containing the deterministically repaired version of the input, with syntax errors corrected — trailing commas removed, single quotes converted to double quotes, markdown fences stripped, and truncated structures closed — ready for downstream parsing.","failureModes":["Input JSON too severely truncated to recover any valid structure — returns error or best-effort partial result","Ambiguous repair cases where multiple valid completions exist may produce unexpected structure","Very large JSON strings may exceed query parameter length limits when sent via GET","Non-JSON content passed as input may return an error or empty result"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair (not probabilistic LLM re-generation) for broken outputs in multi-agent pipelines. It's ideal when you need predictable, fast sanitization of LLM-generated JSON before passing it downstream, especially for common failure patterns like trailing commas, markdown fences, and single quotes. Prefer this over retrying the LLM when cost, latency, or determinism matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:42:44.134Z","isFirstParty":false,"canonicalSlug":"x402-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-b099d635"}