{"uid":"cap_BmiWK8ouqkLcH7UgSIc3Z","slug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-aa08c830","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":"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_L6m8l5NEsJn9kuJwLctmH","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 LLM response came back as broken JSON with trailing commas and markdown fences — can you repair it into valid, parseable JSON so my pipeline doesn't crash? Here's the raw output: ```json {name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"Fix LLM output before pipeline step","prompt":"My language model just returned this malformed JSON with single quotes and a trailing comma — fix it into valid JSON so the next agent in my pipeline can parse it: {name: 'Bob', score: 95,}"},{"title":"Strip markdown fences from agent response","prompt":"The agent returned its JSON wrapped in a markdown code block with backticks and I need clean parseable JSON — can you repair this: ```json\\n{\\\"status\\\": \\\"ok\\\",\\\"data\\\": [1,2,3,]\\n}\\n```"},{"title":"Recover truncated JSON from API response","prompt":"I got a truncated JSON string that got cut off mid-object from a streaming LLM call — try to repair it into something valid: {\\\"user\\\": \\\"alice\\\", \\\"items\\\": [\\\"apple\\\", \\\"ban"}],"resultDescription":"Returns a JSON object containing the repaired, normalized, and valid JSON output derived from the malformed input string, ready for downstream parsing and agent consumption.","failureModes":["Input is too severely truncated or corrupted to deterministically repair — returns error with explanation","Input is empty or whitespace — rejected with minLength validation error","JSON is so structurally broken that no deterministic repair is possible — returns partial result or error","Payment not included or invalid — returns HTTP 402 requiring x402 micropayment","Idempotency key collision with different payload — may return cached result"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that may contain common LLM formatting errors such as trailing commas, markdown code fences, single quotes instead of double quotes, or truncation. It is especially valuable as a defensive layer between LLM output nodes and downstream JSON-parsing steps, ensuring pipeline stability without writing custom repair logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:38:39.575Z","isFirstParty":false,"canonicalSlug":"hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e04c99ac"}