{"uid":"cap_gcTM21xZsfxyyUf8Ds2c4","slug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-0ab0354b","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-fix)","url":"https://serp-extract.agentdiet.dev/v1/json-fix?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["raw_json"],"properties":{"limit":{"type":"integer","default":20,"maximum":100,"minimum":1,"description":"Maximum number of items to return per page (1-100)"},"cursor":{"type":"string","description":"Opaque pagination cursor for fetching the next page"},"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_jGm_WAX-ypIbhrqfxJfb9","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 LLM output came back as broken JSON with trailing commas and markdown fences — can you repair it so I can parse it? Here's the raw string: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"Fix crashed agent pipeline JSON","prompt":"My multi-agent pipeline just crashed because the LLM returned malformed JSON with trailing commas and a markdown code fence wrapper — can you repair this raw string so I can continue processing? The bad JSON is: ```{\"status\": \"ok\", \"results\": [1, 2, 3,],}```"},{"title":"Sanitize LLM output before DB insert","prompt":"Before I save this to the database, I need you to fix this JSON that came back from the model — it has single quotes instead of double quotes and some extra commas: {'user': 'bob', 'score': 99,}"},{"title":"Validate repaired JSON in automation workflow","prompt":"I have this truncated JSON from an LLM response that cuts off mid-object — can you deterministically repair it and give me back valid, parseable JSON? Here it is: {\"items\": [\"apple\", \"banana\""}],"resultDescription":"Returns a repaired, valid JSON object that has been cleaned of common LLM output artifacts such as trailing commas, markdown code fences, single quotes, and truncation errors — ready for programmatic parsing.","failureModes":["Input JSON too severely malformed to deterministically repair — returns error or best-effort partial output","Input string is not JSON at all (e.g. plain prose) — may fail to produce valid output","Ambiguous truncation where multiple valid completions exist — may produce unexpected structure","Empty or whitespace-only raw_json input — returns validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline regularly receives malformed JSON that crashes downstream processing — particularly when outputs include markdown fences, trailing commas, or single quotes common in GPT/Claude outputs. Prefer this over a generic JSON linter when you need deterministic, agent-friendly repair without hallucination risk and need to pay per-call via HTTP 402 micropayment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:13.218Z","isFirstParty":false,"canonicalSlug":"serp-extract-agentdiet-dev-deterministic-a2a-broken-json-repair-6e5dc902"}