{"uid":"cap_LJo2PJUtSOqqgIWyphtJc","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-8d214580","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-repair)","url":"https://serp-extract.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_xEMz5PkO3FmBhBNtuItxq","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 the LLM has trailing commas and markdown code fences wrapped around it — can you repair it so it parses cleanly? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"The previous agent in my pipeline returned this broken JSON with trailing commas and I need it repaired before passing it downstream: {\"results\": [\"item1\", \"item2\",], \"count\": 2,}"},{"title":"Strip markdown fences from agent output","prompt":"My LLM wrapped its JSON response in markdown code fences and now my parser is crashing — can you clean this up and give me valid JSON? ```json\n{\"status\": \"ok\", \"data\": {\"score\": 0.95}}\n```"},{"title":"Repair single-quoted JSON from scraper","prompt":"I got this JSON-like string back from a web scraper but it uses single quotes instead of double quotes and it won't parse — please fix it: {'name': 'Bob', 'city': 'Austin'}"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of trailing commas, markdown fences, single quotes, and other common malformations produced by LLMs or scrapers — ready to be parsed without errors by downstream agent steps.","failureModes":["Input is so severely truncated that structural intent cannot be inferred — returns error or best-effort partial repair","Input is not JSON-like at all (e.g. plain prose) — may return error or unexpected output","Ambiguous repair cases where multiple valid interpretations exist — deterministic repair may choose one arbitrarily","Payment not processed (x402) — request rejected before repair attempt","Empty raw_json field — validation error returned"],"whenToPreferThis":"Choose this endpoint when you have a multi-agent pipeline where an upstream LLM or scraper produces JSON that fails to parse due to common formatting errors like trailing commas, markdown code fences, single quotes, or truncation. It is specifically designed for deterministic (non-AI) repair, making it fast, predictable, and safe for automated pipelines where consistency matters more than creative interpretation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:36:48.939Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}