{"uid":"cap_kD4lnAN_0Fiy-vHE-ZL2D","slug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-2bdc8fa4","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://polymarket-odds.agentdiet.dev/v1/json-normalizer)","url":"https://polymarket-odds.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_m3KFc_6hLY2S-xwHmlFQx","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"polymarket-odds.agentdiet.dev","brandSlug":"polymarket-odds-agentdiet-dev-mpp","brandBaseUrl":"https://polymarket-odds.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":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so it's valid and parseable: ```{'name': 'Alice', 'score': 42,}```?","exampleUseCases":[{"title":"Fix LLM JSON before downstream agent","prompt":"My LLM agent returned this malformed JSON with single quotes and a trailing comma — repair it so I can pass it to the next step in my pipeline: {'user': 'bob', 'status': 'active',}"},{"title":"Strip markdown fences from model output","prompt":"The AI response came back wrapped in triple-backtick markdown fences and has some bad formatting — can you normalize this into clean valid JSON: ```json\n{\"items\": [1, 2, 3,]}\n```"},{"title":"Recover truncated JSON from partial LLM response","prompt":"My LLM got cut off mid-response and gave me truncated JSON — try to repair and complete it so it's valid: {\"report\": {\"title\": \"Q3 Summary\", \"data\": [1, 2"}],"resultDescription":"A JSON object containing the repaired, normalized, and valid JSON derived from the malformed input string, suitable for direct use in downstream agent or pipeline steps.","failureModes":["Input JSON is so severely malformed it cannot be deterministically repaired — returns error","Input string is completely empty or null — rejected at schema validation","Non-JSON input (e.g. plain text or binary) passed as raw_json — may return error or best-effort result","Ambiguous repair paths where multiple valid JSON structures are plausible — may return unexpected structure","Payment failure via x402 — returns HTTP 402 with payment required details"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that may contain common formatting errors such as trailing commas, markdown code fences, single quotes instead of double quotes, or truncated output. It is especially useful as a pre-processing step before schema validation or downstream agent calls, where invalid JSON would cause crashes. Prefer it over writing custom JSON repair logic when you need a deterministic, hosted solution that handles the most common LLM output malformations reliably.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:46.743Z","isFirstParty":false,"canonicalSlug":"polymarket-odds-agentdiet-dev-deterministic-a2a-broken-json-repair-7944936d"}