{"uid":"cap_pkM4GbLNfBphniSUe90Xr","slug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6738d24c","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-fix)","url":"https://json-repair.agentdiet.dev/v1/json-fix?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_ISn7advHaid5blVj9Skyj","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) into valid JSON for use in multi-agent pipelines","exampleAgentPrompt":"This JSON came back from the LLM and it's broken — it has trailing commas, markdown fences, and single quotes everywhere. Can you fix it so it's valid JSON I can use? Here it is: ```json {'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"LLM output sanitization in agent pipeline","prompt":"The language model just returned this mangled JSON with markdown fences and trailing commas — can you repair it into valid JSON before I pass it to the next step? Here it is: ```json {'user': 'Bob', 'score': 42,}```"},{"title":"Multi-agent JSON handoff error recovery","prompt":"My agent received this truncated JSON from upstream and the pipeline crashed. Can you fix it so it's valid and complete? The broken string is: {\"task\": \"summarize\", \"items\": [\"a\", \"b\""},{"title":"Pre-processing LLM JSON before database insert","prompt":"Before I store this into the database, can you clean up this JSON the model returned? It has single quotes and a trailing comma that will break the insert: {'id': 99, 'label': 'test',}"}],"resultDescription":"A JSON object containing the repaired, valid JSON — transformed from the malformed input by fixing issues such as trailing commas, markdown code fences, single quotes, and truncated structures into well-formed, parseable JSON.","failureModes":["Input string is so severely malformed it cannot be deterministically repaired — returns error or best-effort partial result","Non-JSON input (e.g. plain text, binary) passed as raw_json — may return an error or unexpected output","Extremely long or deeply nested JSON may exceed processing limits","Missing required raw_json parameter — returns 400 bad request","Payment not completed via x402 — returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives malformed JSON that needs deterministic, rule-based repair rather than LLM-based regeneration — especially when you need fast, cheap, and reliable fixing of common LLM output artifacts like trailing commas, markdown fences, and single quotes. Prefer this over asking the LLM to reformat its own output, which is slower and costs more tokens.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:00.056Z","isFirstParty":false,"canonicalSlug":"json-repair-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-e921208f"}