{"uid":"cap_Hk-NDnqJDIHWA2w4YR3qK","slug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-bc646e36","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://company-enrich.agentdiet.dev/v1/malformed-json-healer)","url":"https://company-enrich.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_kHKM3ML1uLc4oiFUv2bmb","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"company-enrich.agentdiet.dev","brandSlug":"company-enrich-agentdiet-dev-mpp","brandBaseUrl":"https://company-enrich.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 response came back with broken JSON — it has trailing commas, markdown code fences, and single quotes. Can you fix it so it parses correctly? Here's the raw output: ```json\\n{'name': 'Acme Corp', 'revenue': 1000000,}\\n```","exampleUseCases":[{"title":"Fixing LLM pipeline JSON crashes","prompt":"My agent pipeline keeps crashing because the model keeps outputting JSON with trailing commas and markdown fences — can you clean up this raw output and give me valid JSON I can parse? Here it is: ```json\\n{'company': 'TechCorp', 'founded': 2010,}\\n```"},{"title":"Sanitizing single-quoted JSON from model","prompt":"The language model returned JSON using single quotes instead of double quotes and it won't parse. Fix this for me: {'employees': 500, 'sector': 'finance', 'public': true}"},{"title":"Repairing truncated JSON output","prompt":"I got a cut-off JSON response from my LLM that's missing the closing brackets — can you repair it and return a valid JSON object? The broken string is: {\"name\": \"OpenAI\", \"products\": [\"ChatGPT\", \"DALL-E\""}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing without crashes","failureModes":["JSON is so severely malformed that deterministic repair is impossible, returning an error","Input is not JSON at all (e.g. plain text or binary), resulting in a repair failure","Ambiguous truncation where the intended structure cannot be inferred, leading to incorrect repair","Empty or whitespace-only input returning a validation error"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that frequently contains syntax errors like trailing commas, markdown code fences, single quotes, or truncation — and you need a fast, deterministic (non-LLM) repair that won't introduce hallucinated values or alter the data semantics. Prefer this over prompting the LLM to self-correct (which is slow and non-deterministic) or writing custom regex parsers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:40:41.984Z","isFirstParty":false,"canonicalSlug":"company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1"}