{"uid":"cap_hPmLV8VGp4q4YhqJX9SSN","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-1909455c","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/v1/json-validator)","url":"https://json-repair.agentdiet.dev/v1/json-validator?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_m17Yy7XWtu1nDOFUe6mDJ","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) so multi-agent pipelines never crash.","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and a markdown code fence — can you repair it so I can parse it: ```json {\"name\": \"Alice\", \"age\": 30,} ```?","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"My AI agent returned this malformed JSON with a trailing comma and it's crashing my pipeline: {\"status\": \"ok\", \"items\": [1, 2, 3,]} — can you repair it so it's valid?"},{"title":"Strip markdown fences from JSON response","prompt":"The language model wrapped its JSON in triple backticks and now I can't parse it — here's the raw output: ```json\n{\"result\": \"success\"}\n``` — please clean it up and give me valid JSON."},{"title":"Repair single-quoted JSON from legacy tool","prompt":"I got this JSON string back from an older tool that used single quotes instead of double quotes: {'user': 'bob', 'score': 42} — can you fix it to proper JSON format?"}],"resultDescription":"Returns a repaired, valid JSON object derived from the malformed input. The response includes the corrected JSON with all syntax errors resolved — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing without crashes.","failureModes":["Input is not recoverable JSON at all (random binary or plain text) — returns error or empty result","Severely truncated input may lose data during repair","Ambiguous structures may be repaired in an unexpected way","Missing required raw_json parameter returns a 400/422 error","Payment not completed (x402) returns a 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives unpredictable JSON output that may contain syntax errors such as trailing commas, single quotes, markdown code fences, or truncation artifacts. It is especially valuable as a deterministic, rule-based repair layer before passing LLM responses to a JSON parser, avoiding pipeline crashes without needing another LLM call to fix formatting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:26:24.039Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}