{"uid":"cap_DFTmjpq4cVWcnhqKNy-iM","slug":"preflight-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1d25665d","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://preflight.agentdiet.dev/v1/json-repair)","url":"https://preflight.agentdiet.dev/v1/json-repair?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_OOlzV1DggDLRmHUpEG5wj","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"preflight.agentdiet.dev","brandSlug":"preflight-agentdiet-dev-mpp","brandBaseUrl":"https://preflight.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines can process them without crashing","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so I can parse it: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output before database insert","prompt":"My language model returned a JSON string with trailing commas and it's breaking my pipeline — can you repair this so I can safely insert it into the database: {\"user\": \"bob\", \"score\": 95,}"},{"title":"Strip markdown fences from agent response","prompt":"The agent response came back wrapped in triple-backtick markdown fences and my JSON parser is choking on it — clean it up for me: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3]}\n```"},{"title":"Recover truncated JSON from partial LLM output","prompt":"The model got cut off mid-response and now I have a truncated JSON object — can you repair it and give me back something valid: {\"report\": {\"title\": \"Q1 Summary\", \"data\": [1, 2"}],"resultDescription":"Returns a repaired, valid JSON object that has been cleaned of common LLM-introduced syntax errors including trailing commas, markdown code fences, single-quoted strings, and truncation artifacts","failureModes":["Input JSON is too severely malformed to deterministically repair — returns an error indicating repair was not possible","Input string contains no JSON-like structure at all","Repaired output may differ semantically if truncation required guessing at missing values","Request missing the required raw_json parameter returns a validation error"],"whenToPreferThis":"Choose this endpoint when your agent pipeline receives JSON from an LLM or another agent and needs a lightweight, deterministic fix before downstream parsing — especially when you need predictable, rule-based repair rather than an LLM-based rewrite. Ideal for high-volume, low-latency pipelines where reliability and cost predictability matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:42.013Z","isFirstParty":false,"canonicalSlug":"preflight-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1d25665d"}