{"uid":"cap_r2pZX4ZAJ-z0xdkVWhMJ6","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-96fbcf33","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__i9TgVpGzqLP0soAdPIy9","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":"This JSON string from the LLM is broken — it has trailing commas and markdown code fences. Can you repair it deterministically so I can use it in the next pipeline step: ```{\"name\": \"Alice\", \"age\": 30,}```?","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The language model returned malformed JSON with a trailing comma and single quotes instead of double quotes — can you repair it so the downstream agent doesn't crash? Here's the raw output: {'name': 'Bob', 'score': 42,}"},{"title":"Strip markdown fences from JSON response","prompt":"My LLM wrapped its JSON response in markdown code fences and now my parser is failing. Please clean and repair this: ```json\n{\"status\": \"ok\", \"items\": [1, 2, 3,]}\n```"},{"title":"Validate and recover truncated JSON","prompt":"The API call timed out mid-response and I got a truncated JSON string. Can you repair it and return a valid JSON object? Here's what I have: {\"user\": \"carol\", \"results\": [\"a\", \"b\""}],"resultDescription":"Returns a repaired, valid JSON object where the malformed or truncated input has been deterministically fixed — trailing commas removed, markdown fences stripped, single quotes normalized, and any truncation completed — ready for downstream agent consumption.","failureModes":["Input is so severely malformed it cannot be deterministically repaired — returns error or partial result","Non-JSON input (e.g. plain text or binary) passed as raw_json — endpoint may reject or return error","Extremely large JSON strings may hit query parameter length limits when passed via GET","Network or payment (x402) errors returning 402 if payment is not properly handled"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that may be truncated, contain trailing commas, use single quotes, or be wrapped in markdown fences — and you need a deterministic (non-LLM) repair rather than asking another LLM to reformat it. Prefer this over ad-hoc regex fixes or prompting the LLM again when reliability and speed matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:49:57.152Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}