{"uid":"cap_Rpd2ygtJ_1o1NenqDNkkw","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-df864f1d","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/api)","url":"https://json-repair.agentdiet.dev/api?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_t5YXoy4gwiWofYvclNTJH","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","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, truncation) so multi-agent pipelines never crash on bad JSON.","exampleAgentPrompt":"This LLM response came back as broken JSON with trailing commas and markdown code fences — can you repair it into valid JSON? Here's the raw string: ```{\"name\": \"Alice\", \"age\": 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI just returned this malformed JSON with a trailing comma and I need it fixed before the next step in my pipeline can use it: {\"result\": \"success\", \"score\": 0.95,}"},{"title":"Strip markdown fences from JSON response","prompt":"The language model wrapped its JSON output in triple backtick markdown fences and now my parser is crashing — can you clean it up and return valid JSON? Here's what I got: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3]}\n```"},{"title":"Recover truncated JSON from token cutoff","prompt":"My LLM hit a token limit and the JSON got cut off halfway through — it ends without closing brackets. Can you repair this truncated JSON so it's valid? The string is: {\"users\": [{\"id\": 1, \"name\": \"Bob\""}],"resultDescription":"A repaired, valid JSON object parsed from the malformed input string. The response is a JSON object containing the corrected data structure, with all syntax errors (trailing commas, markdown fences, single quotes, truncation) resolved deterministically.","failureModes":["Input is so severely malformed that no deterministic repair is possible — returns error or empty object","Input is not JSON-like at all (e.g. plain prose) — repair may produce nonsensical structure","Very large truncated inputs may result in ambiguous completions that differ from original intent","Missing required raw_json parameter returns a 400 or validation error","Payment failure via x402 returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated pipelines — especially when you cannot afford non-deterministic behavior. Prefer this over general-purpose JSON parsers when inputs consistently contain LLM-specific artifacts like markdown fences, trailing commas, or mid-generation truncation. Ideal for multi-agent workflows where downstream steps require strictly valid JSON.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:22:54.928Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}