{"uid":"cap_hfzyqcYm4rDtWCBtDB26q","slug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-62fa5b81","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-fix)","url":"https://github-audit.agentdiet.dev/v1/json-fix?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_m8nA4dBPKFay-XUl0giln","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 malformed, truncated, or markdown-wrapped JSON strings (trailing commas, single quotes, fences) so multi-agent pipelines can process them without crashing.","exampleAgentPrompt":"This JSON string came back from an LLM and has trailing commas and single quotes — can you run it through the JSON repair service and give me back valid JSON? Here it is: {'name': 'Alice', 'score': 42,}","exampleUseCases":[{"title":"Fix LLM JSON before pipeline processing","prompt":"My agent just returned this malformed JSON with a trailing comma and markdown fences — please repair it so I can pass it to the next step: ```json {\"user\": \"bob\", \"items\": [1, 2, 3,]} ```"},{"title":"Recover truncated JSON mid-generation","prompt":"The model got cut off and I have this incomplete JSON: {\"order_id\": \"abc123\", \"status\": \"pending\", \"items\": [{\"sku\": \"X99\" — can you repair it so it's valid and parseable?"},{"title":"Sanitize single-quoted JSON from scraped data","prompt":"I scraped some data and it came back using single quotes instead of double quotes: {'product': 'widget', 'price': 9.99} — can you fix it into proper valid JSON?"}],"resultDescription":"A repaired, valid JSON object derived from the input malformed string, with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncations resolved where possible.","failureModes":["Input JSON is too severely malformed or ambiguous to deterministically repair — returns an error or best-effort output","Input string is completely empty or not JSON-like at all","Truncation is so extreme that the original structure cannot be inferred","Rate limit or payment failure for x402 micropayment"],"whenToPreferThis":"Choose this endpoint when an LLM or agent in your pipeline has produced malformed JSON that causes downstream parsing failures — especially common issues like trailing commas, markdown code fences, single quotes, or mid-generation truncations. Prefer this over manual parsing logic or regex hacks when you need deterministic, reliable repair in automated multi-agent workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:51:14.689Z","isFirstParty":false,"canonicalSlug":"github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-cc0bdacf"}