{"uid":"cap_FnjPeR2pOn4QPu5jNtKSm","slug":"hn-pulse-agentdiet-dev-deterministic-json-repair-schema-validator-b6417613","name":"Deterministic 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":"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_qPraShCHHZ2FwrOEWmcWo","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 malformed, truncated, or improperly formatted LLM JSON outputs (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes","exampleAgentPrompt":"This JSON output from the last LLM call is broken — it has trailing commas and markdown code fences wrapping it. Can you fix it so I can parse it? Here it is: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before downstream agent","prompt":"The AI just returned this JSON with trailing commas and it's crashing my pipeline — can you repair it so the next agent can process it? Here's the bad output: {\"status\": \"ok\", \"items\": [\"a\", \"b\",]}"},{"title":"Strip markdown fences from JSON response","prompt":"My language model wrapped its JSON answer in triple backtick fences and now I can't parse it. Can you clean it up and return valid JSON? The raw output is: ```json\n{\"result\": \"success\", \"count\": 5}\n```"},{"title":"Recover truncated JSON from cut-off response","prompt":"The model's response got cut off mid-JSON and it's now invalid. Can you try to repair this truncated JSON and give me something parseable? Here it is: {\"user\": \"Bob\", \"score\": 42, \"tags\": [\"premium\""}],"resultDescription":"A JSON object containing the repaired, valid JSON structure derived from the malformed input, suitable for immediate programmatic use without further sanitization","failureModes":["JSON too severely truncated or corrupted to recover — returns error or best-effort partial result","Input that is not JSON-like at all — no recognizable structure to repair","Network timeout or service unavailability returning HTTP 5xx","Payment failure via x402 protocol returning HTTP 402 if USDC balance insufficient","Ambiguous repair cases where multiple valid interpretations exist — may return one without indication of ambiguity"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives JSON from an LLM that fails to parse due to common formatting errors like trailing commas, markdown code fences, single quotes instead of double quotes, or truncation. It is purpose-built for deterministic (non-AI, rule-based) JSON repair, making it reliable and predictable compared to asking another LLM to fix the JSON. Best suited for automated pipelines where consistent, fast correction is needed at $0.002 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:41.353Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-json-repair-schema-validator-b6417613"}