{"uid":"cap_VPYc4V6Hcqk4TqmwF16o6","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-879d9faf","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-normalizer)","url":"https://hn-pulse.agentdiet.dev/v1/json-normalizer?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_jhWeMIY6t940nn_yrhqyg","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 from my LLM has trailing commas and markdown code fences wrapped around it — can you repair and normalize it so my pipeline can parse it? Here's the raw string: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"LLM output cleanup in agent pipeline","prompt":"My language model keeps returning JSON wrapped in markdown code blocks with trailing commas — can you clean up this raw output so my downstream agent can parse it without crashing? Here's the malformed string: ```json {'user': 'bob', 'score': 42,} ```"},{"title":"Recovering truncated JSON from AI response","prompt":"The AI response got cut off mid-JSON and now my parser is throwing errors. Can you repair this truncated JSON and give me back a valid, complete object? Here's what I have: {\"items\": [\"apple\", \"banana\", \"cherry\""},{"title":"Single-quote JSON normalization for data pipeline","prompt":"I'm getting JSON from an older system that uses single quotes instead of double quotes, and it's breaking my ingestion pipeline. Can you normalize this to valid JSON? Here's the string: {'product': 'widget', 'price': 9.99, 'in_stock': True}"}],"resultDescription":"A repaired, syntactically valid JSON object where the malformed input has been deterministically fixed — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, truncated structures closed, and the result returned as a parseable JSON structure.","failureModes":["Input is so severely malformed that repair is not deterministically possible — ambiguous structure","Input string is empty or whitespace — validation error returned","JSON is too deeply nested or too large to process","Input contains non-JSON content that cannot be coerced into valid JSON","Payment not completed (HTTP 402) — endpoint requires $0.002 USDC per call"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives raw LLM or AI model output that frequently contains markdown fences, trailing commas, single quotes, or truncation artifacts and you need a deterministic (not probabilistic) repair rather than asking another LLM to fix it. Prefer this over rolling your own regex-based cleanup when you need reliability across multiple malformation types in a single pass.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:25.635Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}