{"uid":"cap_bLhJnnf5T14jor1RcR4lV","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-fc4f1c4b","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":"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_klL8O6gHWJzcB0wLboFYu","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) into valid JSON so multi-agent pipelines don't crash","exampleAgentPrompt":"This JSON string came back from an LLM and it has trailing commas and markdown code fences — can you repair it into valid JSON so I can pass it to the next step in my pipeline? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"LLM output sanitization in pipeline","prompt":"The language model just returned this JSON wrapped in markdown backticks with a trailing comma: ```{\"status\": \"ok\", \"score\": 0.95,}``` — can you strip the fences and fix it so I can feed it into the next agent?"},{"title":"Fix single-quoted JSON from AI agent","prompt":"I got this back from my coding agent and it used single quotes instead of double quotes: {'user': 'bob', 'role': 'admin'} — please repair it into valid JSON I can parse."},{"title":"Recover truncated JSON response","prompt":"My LLM response got cut off halfway through and the JSON is incomplete — here's what I have: {\"items\": [{\"id\": 1, \"name\": \"widget\" — can you deterministically repair this so my pipeline doesn't crash?"}],"resultDescription":"A valid, repaired JSON object that has had malformations such as trailing commas, markdown code fences, single quotes, and truncation corrected, ready for downstream parsing or agent consumption.","failureModes":["Input string is so severely malformed it cannot be deterministically repaired — returns error with explanation","Empty or whitespace-only input string — returns validation error","Input that is not JSON at all (e.g. plain English prose) — may return error or unexpected result","Extremely long truncated JSON where the missing portion cannot be inferred — partial repair or error"],"whenToPreferThis":"Choose this endpoint when a multi-agent or LLM pipeline receives JSON that may be truncated, wrapped in markdown fences, contain trailing commas, or use single quotes — especially when you need deterministic (rule-based, not generative) repair to avoid non-deterministic re-generation. Ideal for production agent pipelines where reliability and low latency matter more than creative reconstruction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:38:13.411Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}