{"uid":"cap_QAz5etjUcccRTrU4RhNCf","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-845c6a6e","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://hn-pulse.agentdiet.dev/v1/malformed-json-healer)","url":"https://hn-pulse.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_3nbmjESd8I_umlPuRRB8g","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"hn-pulse.agentdiet.dev","brandSlug":"hn-pulse-agentdiet-dev-mpp","brandBaseUrl":"https://hn-pulse.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 came back from the LLM with trailing commas and markdown code fences and it's breaking my pipeline — can you repair it so it's valid JSON? Here it is: ```json {\"name\": \"Alice\", \"score\": 42, } ```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"The language model returned malformed JSON with a trailing comma that's crashing my downstream parser — can you fix this string so it's valid JSON: '{\"result\": \"ok\", \"count\": 5,}'"},{"title":"Stripping markdown fences from JSON","prompt":"My AI agent wrapped its JSON response in triple-backtick markdown fences and now I can't parse it — clean it up and give me proper JSON: '```json\\n{\"status\": \"done\", \"items\": [1, 2, 3]}\\n```'"},{"title":"Repairing single-quoted JSON from chatbot","prompt":"I got this JSON back from a chatbot but it uses single quotes instead of double quotes and Python's json.loads is failing — repair it for me: \"{'user': 'bob', 'active': true}\""}],"resultDescription":"A repaired, valid JSON object derived from the malformed input string, with syntax errors such as trailing commas, markdown code fences, and single quotes corrected deterministically so it can be parsed by standard JSON parsers.","failureModes":["Input is so severely truncated or corrupted that deterministic repair is impossible — returns error","Input is not JSON-like at all (e.g. plain text or binary) — returns error","Ambiguous repair paths where multiple valid interpretations exist — may return best-guess result","Missing required raw_json parameter — returns 400 or validation error","Network/service unavailability — returns 5xx error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated multi-agent pipelines where crash prevention is critical. It is ideal when the malformation patterns are known (trailing commas, markdown fences, single quotes, truncation) and you need a fast, cheap, reproducible fix without invoking another LLM. Prefer it over LLM-based JSON fixing when you need idempotency and auditability.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:47.116Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}