{"uid":"cap_4a1Kxv53oGr8ygnSdyBWW","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-2426da26","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-fix)","url":"https://hn-pulse.agentdiet.dev/v1/json-fix?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_pdcfURRyd7xmHHzjMTufU","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 an LLM and it's broken — it has trailing commas and markdown fences around it — can you fix it so I can pass it to the next step in my pipeline? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"LLM pipeline crash prevention","prompt":"My language model keeps returning JSON wrapped in markdown code fences with trailing commas, and it's crashing my downstream agent. Can you strip the fences and fix the syntax so I get clean, valid JSON back? Here's the raw output: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3,],}```"},{"title":"Single-quoted JSON normalization","prompt":"I got this JSON from a model that used single quotes instead of double quotes: {'user': 'bob', 'score': 42} — can you repair it into valid standard JSON I can parse?"},{"title":"Truncated LLM response recovery","prompt":"My LLM response got cut off mid-JSON and now it won't parse. Here's the truncated string: {\"results\": [{\"id\": 1, \"value\": \"foo\"}, {\"id\": 2, \"val — can you repair it into something valid I can work with?"}],"resultDescription":"Returns a JSON object containing the repaired, syntactically valid JSON. The malformed input is corrected for issues such as trailing commas, markdown code fences, single quotes, and truncation, producing a parseable output safe for downstream consumption in multi-agent pipelines.","failureModes":["JSON too severely truncated or corrupted to deterministically recover — returns error or best-effort partial result","Input string is not JSON-like at all — may return error indicating no JSON structure detected","Payment not processed (HTTP 402) — request blocked until valid x402 USDC payment is provided","Rate limiting or network errors if the service is unavailable"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or syntactically invalid JSON from an LLM and needs a deterministic, programmatic fix rather than asking the LLM to retry. Ideal for production pipelines where reliability matters, especially when dealing with markdown-wrapped outputs, trailing commas, or single-quoted keys that standard JSON parsers reject.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:36:15.049Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}