{"uid":"cap_IzsFciBP2K1RHQLdkuL6t","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-bd6080a9","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://github-audit.agentdiet.dev/v1/malformed-json-healer)","url":"https://github-audit.agentdiet.dev/v1/malformed-json-healer?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_pQNembEq5ILbdFEqnLnHB","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"github-audit.agentdiet.dev","brandSlug":"github-audit-agentdiet-dev-mpp","brandBaseUrl":"https://github-audit.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 code fences — can you repair it into valid JSON so the pipeline doesn't crash? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fixing LLM output before database write","prompt":"The language model just returned this JSON with a trailing comma and it's going to break our database insert — can you fix it? Here's the raw output: {\"user\": \"bob\", \"score\": 42,}"},{"title":"Stripping markdown fences from agent response","prompt":"Our agent wrapped its JSON response in triple-backtick markdown fences and now the downstream parser is failing — please clean it up and return valid JSON from this: ```json\n{\"status\": \"ok\", \"count\": 5}\n```"},{"title":"Repairing single-quoted JSON in pipeline","prompt":"We got this JSON from an upstream model that used single quotes instead of double quotes and it's crashing the next step — repair it to valid JSON: {'product': 'widget', 'price': 9.99}"}],"resultDescription":"A JSON object containing the repaired, syntactically valid JSON derived from the malformed input. The original malformed JSON is cleaned of issues such as trailing commas, markdown fences, single quotes, and truncation, returning a parseable structure ready for use in downstream pipeline steps.","failureModes":["Input is so severely corrupted that deterministic repair is impossible — may return error or best-effort partial result","Input string is empty or null — validation error returned","JSON structure is semantically ambiguous after repair — repaired output may not match original intent","Extremely nested or large payloads may timeout or produce unexpected results","Non-JSON content submitted (e.g. plain text or binary) — service may return error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated multi-agent pipelines where reliability is critical. Prefer this over ad-hoc string manipulation or re-prompting the LLM when you need a consistent, low-latency fix for common JSON syntax issues like trailing commas, markdown fences, and single quotes without incurring additional LLM inference costs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:32:44.445Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}