{"uid":"cap_BhPbIoV2QOQKNm4qJi8Tz","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-aa30e3ac","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://serp-extract.agentdiet.dev/v1/json-validator)","url":"https://serp-extract.agentdiet.dev/v1/json-validator?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_UeYnQpjQx-T6FLTo6Rs1w","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"serp-extract.agentdiet.dev","brandSlug":"serp-extract-agentdiet-dev-mpp","brandBaseUrl":"https://serp-extract.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 string from my LLM has trailing commas and markdown fences and is crashing my pipeline — can you repair it and give me clean, valid JSON back? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output in agentic pipeline","prompt":"My AI agent just returned this JSON with trailing commas and it's breaking my downstream step — can you fix it so it's valid? Here's the raw string: {\"result\": \"ok\", \"score\": 0.95,}"},{"title":"Stripping markdown fences from model response","prompt":"My language model wrapped its JSON response in triple backtick markdown fences and now my parser is failing — please strip the fences and return clean valid JSON for this: ```json\n{\"status\": \"complete\", \"items\": [1, 2, 3]}\n```"},{"title":"Repairing single-quoted JSON from chatbot","prompt":"I got this single-quoted JSON back from a chatbot and it won't parse — can you convert it to proper double-quoted valid JSON? {'user': 'bob', 'active': true}"}],"resultDescription":"A JSON object containing the repaired, valid JSON — ready to be parsed and passed to the next step in the pipeline without crashing","failureModes":["JSON is too severely corrupted to deterministically repair — returns error indicating unrecoverable input","Input string is empty or missing raw_json field — returns 422 validation error","Ambiguous structure where repair would change semantics — may return best-effort result with warning","Payment required (HTTP 402) if x402 USDC payment header is missing or insufficient"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives raw LLM or chatbot output that may contain trailing commas, single quotes, markdown fences, or truncation artifacts — and you need a deterministic (not probabilistic) repair before passing JSON downstream. Prefer it over manual regex hacks or LLM-based re-prompting when you need fast, reliable, idempotent JSON sanitization at $0.002 per call with idempotency-key support for safe retries.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:43:41.177Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}