{"uid":"cap_06Q9Sc5Qn-dZl-OpmX9D3","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-7412f309","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://github-audit.agentdiet.dev/v1/json-normalizer)","url":"https://github-audit.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_e_Eo2C73Eu9_s3r5zVG5r","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"github-audit.agentdiet.dev","brandSlug":"github-audit-agentdiet-dev-mpp","brandBaseUrl":"https://github-audit.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 string came back from the LLM and it's broken — has trailing commas, single quotes, and a markdown fence around it. Can you repair it so it's valid JSON I can actually parse: ```{'name': 'Alice', 'age': 30,}```?","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The structured data my LLM just returned is malformed — it has trailing commas and single quotes instead of double quotes. Can you repair this JSON so my downstream agent step doesn't crash: {name: 'Bob', scores: [95, 87, 100,]}?"},{"title":"Strip markdown fences from JSON","prompt":"My AI model wrapped its JSON response in triple backtick markdown fences and it's breaking my parser. Here's the raw output — can you clean it up into valid, parseable JSON: ```json\n{\"status\": \"ok\", \"result\": \"done\",}\n```?"},{"title":"Recover truncated JSON response","prompt":"I got a cut-off JSON response from an LLM call that ran out of tokens — it's missing closing brackets and has some syntax errors. Can you deterministically repair this truncated JSON so I can use it: {\"items\": [{\"id\": 1, \"name\": \"widget\"}?"}],"resultDescription":"Returns a repaired, syntactically valid JSON object with all malformations corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncations completed where possible.","failureModes":["Input is so severely corrupted that deterministic repair is impossible — returns error with explanation","Input string is empty or missing the raw_json field — returns 400 validation error","JSON structure is ambiguous after truncation and cannot be deterministically completed — partial repair returned with warning","Network timeout or service unavailability — returns 503"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated multi-agent pipelines where consistency and reliability matter more than probabilistic fixes. Ideal when your pipeline frequently encounters trailing commas, markdown fences, single quotes, or truncated outputs from language models and you need a fast, cheap ($0.002/call), idempotent fix that won't introduce hallucinated values into the repaired JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:35:08.662Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}