{"uid":"cap_so97_4oYxe5GqqGRV40Y7","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-fb45e829","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://domain-osint.agentdiet.dev/v1/malformed-json-healer)","url":"https://domain-osint.agentdiet.dev/v1/malformed-json-healer?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_jQnh8ZiajFOBGNrv0H_s7","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"domain-osint.agentdiet.dev","brandSlug":"domain-osint-agentdiet-dev-mpp","brandBaseUrl":"https://domain-osint.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 is broken — it has trailing commas, single quotes, and markdown fences wrapping it. Can you fix it so it parses cleanly: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fix LLM output crashing agent pipeline","prompt":"The JSON my language model just returned has trailing commas and is wrapped in markdown code fences, and it's breaking my downstream agent. Can you repair this string so it's valid JSON: ```{\"items\": [\"apple\", \"banana\",], \"count\": 2}```?"},{"title":"Sanitize single-quoted JSON before database insert","prompt":"I got this JSON back from a prompt but it uses single quotes instead of double quotes and my parser won't accept it — can you fix it into proper JSON: {'user': 'bob', 'score': 95}?"},{"title":"Recover truncated JSON from partial LLM response","prompt":"My LLM response got cut off mid-generation and the JSON is incomplete — it just ends with an open bracket. Can you try to repair and close this out so it's valid: {\"results\": [{\"id\": 1, \"title\": \"Report\"?"}],"resultDescription":"A repaired, valid JSON object that has been cleaned of common LLM-introduced formatting errors such as trailing commas, markdown fences, single quotes, and truncation artifacts — ready to parse without errors.","failureModes":["Input JSON is too severely malformed to deterministically repair, returning an error or best-effort partial result","Ambiguous truncation points where the repair logic cannot infer the intended structure","Very large JSON strings may exceed query parameter length limits since input is passed via GET","Non-JSON content passed as input returns an error or unexpected output"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails standard JSON.parse() due to common LLM formatting errors like trailing commas, markdown code fences, single quotes, or truncation. It is deterministic (not generative), making it predictable and safe to use in automated pipelines where consistency matters. Prefer it over writing custom regex fixers when you need a reliable, API-based repair step in a no-crash pipeline architecture.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:55.415Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}