{"uid":"cap_K2S1yknJZTiPZYvs10IRg","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-7f5a16e5","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://json-repair.agentdiet.dev/)","url":"https://json-repair.agentdiet.dev/?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.002000","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.002000/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002000","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.002000","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_p-M1dxSNXXZx33SbzIAqx","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002000","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"json-repair.agentdiet.dev","brandSlug":"json-repair-agentdiet-dev-mpp","brandBaseUrl":"https://json-repair.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 LLM output came back with trailing commas, markdown code fences, and single quotes — can you repair it into valid JSON? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fixing LLM pipeline output crashes","prompt":"My agent pipeline keeps crashing because the language model is returning JSON with trailing commas and markdown fences — can you repair this raw string into valid JSON so processing can continue? Here it is: ```{\"user\": \"bob\", \"score\": 42,}```"},{"title":"Sanitizing single-quoted JSON from chatbot","prompt":"The chatbot returned JSON using single quotes instead of double quotes and it's breaking my parser — can you fix this into valid JSON: {'product': 'widget', 'price': 9.99, 'available': true}"},{"title":"Recovering truncated JSON from LLM response","prompt":"The model response got cut off mid-JSON and now it won't parse — can you repair this truncated output back into valid JSON: {\"items\": [{\"id\": 1, \"name\": \"alpha\"}, {\"id\": 2, \"name\": \"beta\""}],"resultDescription":"Returns a repaired, valid JSON object parsed from the malformed input string, with all common LLM output issues resolved including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed properly.","failureModes":["Input is so severely malformed that deterministic repair cannot infer intent — returns an error or best-effort partial result","Empty or whitespace-only raw_json input triggers validation error","Input contains non-JSON content (e.g. plain prose) with no recoverable structure","Payment/402 failure if x402 credentials are missing or insufficient","Network timeout if the endpoint is temporarily unavailable"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than probabilistic LLM re-generation — ideal for multi-agent pipelines where reproducibility and speed matter. Prefer it when the malformation is structural (trailing commas, markdown fences, single quotes, truncation) rather than semantic. Use it as a lightweight middleware layer between LLM output and downstream JSON consumers to eliminate crash loops.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:31:21.150Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}