{"uid":"cap_ZQaUc5gmg520NEMf-VUUZ","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-c68e8fd1","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":"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_1tiUs31zCyJO7_099HS2X","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) into valid JSON so multi-agent pipelines don't crash","exampleAgentPrompt":"This JSON string came back from the LLM with trailing commas and markdown code fences and it's breaking my pipeline — can you clean it up and give me valid JSON back? Here it is: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"LLM output cleanup in agent pipeline","prompt":"The language model just returned this JSON with a trailing comma and it's wrapped in triple backticks — fix it so my downstream agent can parse it: ```{\"status\": \"ok\", \"results\": [1, 2, 3,]}```"},{"title":"Single-quoted JSON normalization","prompt":"My extraction agent produced JSON using single quotes instead of double quotes and it's failing to parse — can you repair this string and return proper JSON? Here it is: {\"user\": 'john', 'age': 30}"},{"title":"Truncated JSON recovery from streaming output","prompt":"I got a streaming response that got cut off mid-JSON and now it's invalid — repair this truncated JSON so it's parseable: {\"items\": [{\"id\": 1, \"name\": \"Widget\"}, {\"id\": 2"}],"resultDescription":"Returns a JSON object containing the repaired, fully valid JSON derived from the malformed input string, suitable for direct parsing by downstream agents or systems","failureModes":["Input JSON too severely malformed to deterministically repair — ambiguous structure cannot be resolved","Empty or whitespace-only raw_json input returns validation error","Input that is not JSON-like at all (plain text, binary) may fail to repair","Extremely long truncated JSON may be irrecoverable if structure is ambiguous","HTTP 402 payment required if x402 payment header not provided"],"whenToPreferThis":"Use this endpoint when an LLM or agent in your pipeline produces JSON that fails standard JSON.parse() due to common LLM artifacts like trailing commas, markdown code fences, single quotes, or truncation. Prefer this over manual regex heuristics or writing your own repair logic when you need a deterministic, paid-per-call microservice that integrates with x402/MCP pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:01.940Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}