{"uid":"cap_f0pcBo2RlBj5sxIYVQCVx","slug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-3d476569","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://whale-momentum.agentdiet.dev/v1/json-normalizer)","url":"https://whale-momentum.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_aleJx1i7AvJgPPcW6Abnr","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"whale-momentum.agentdiet.dev","brandSlug":"whale-momentum-agentdiet-dev-mpp","brandBaseUrl":"https://whale-momentum.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 code fences — can you fix it so I can parse it properly: ```json {\"name\": \"Alice\", \"age\": 30, } ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent just got back this malformed JSON from GPT-4 with trailing commas and it's crashing my pipeline — can you repair it? Here it is: {\"status\": \"ok\", \"items\": [\"a\", \"b\",], }"},{"title":"Strip markdown fences from agent output","prompt":"The model wrapped its JSON in triple backtick markdown fences and my parser is failing — can you strip them and give me clean, valid JSON? The raw output is: ```json\n{\"result\": \"success\", \"count\": 5}\n```"},{"title":"Fix single-quoted JSON from legacy system","prompt":"I've got this JSON string using single quotes instead of double quotes from an old system and it won't parse — fix it for me: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for immediate parsing downstream.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable structure","Input string is empty or not JSON-like at all — returns validation error","Network timeout or service unavailability — HTTP 5xx response","Payment not processed or insufficient funds — HTTP 402 response"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed, truncated, or markdown-wrapped JSON that needs deterministic repair without hallucination — especially useful as a middleware step between LLM output and downstream JSON parsers. Prefer it over writing custom regex fixers or prompting the LLM to re-output when you need a fast, reliable, reproducible repair with idempotent retry support.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:32:16.054Z","isFirstParty":false,"canonicalSlug":"whale-momentum-agentdiet-dev-deterministic-a2a-broken-json-repair-f38852d9"}