{"uid":"cap_gt6iKT4ip-Pc_mWhnrsmu","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1e787d9e","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/json-validator)","url":"https://hn-pulse.agentdiet.dev/v1/json-validator?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_7sMx7M3c9CPaSSap1eZea","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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines can continue without crashing.","exampleAgentPrompt":"Can you repair this broken JSON for me? It came from an LLM and has trailing commas and markdown code fences: ```json {\"name\": \"Alice\", \"age\": 30, } ```","exampleUseCases":[{"title":"Fix LLM response before downstream processing","prompt":"The LLM just returned this JSON with trailing commas and it's breaking my pipeline — can you repair it so I can parse it? Here's the raw string: {\"status\": \"ok\", \"items\": [1, 2, 3,]}"},{"title":"Strip markdown fences from agent output","prompt":"My AI agent wrapped its JSON response in triple backtick markdown fences and now my parser crashes. Please clean it up: ```json {\"result\": \"success\", \"count\": 5} ```"},{"title":"Recover truncated JSON from a cut-off response","prompt":"The model got cut off mid-response and I ended up with incomplete JSON — something like {\"user\": \"Bob\", \"score\": 99, \"tags\": [\"a\", \"b\" — can you try to repair it so it's valid?"}],"resultDescription":"A JSON object containing the repaired, syntactically valid JSON string derived from the malformed input, suitable for direct parsing by downstream agents or systems.","failureModes":["Input is so severely truncated it cannot be deterministically completed — returns an error or best-effort partial result","Input is not JSON at all (e.g., plain text or binary) — may return validation failure","Ambiguous repair cases (e.g., conflicting quote styles) may produce unexpected output","Payment failure via x402 returns HTTP 402 before processing occurs"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives raw LLM JSON outputs that are syntactically invalid due to common issues like trailing commas, markdown fences, or single-quoted keys, and you need a deterministic (non-generative) repair rather than asking the LLM to re-generate the JSON. Particularly valuable in high-throughput pipelines where re-prompting is too slow or costly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:39.364Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}