{"uid":"cap_6phrKQXzFhmECf3_iriUV","slug":"agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-f8b67c0f","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://agentdiet.dev/v1/json-validator)","url":"https://agentdiet.dev/v1/json-validator?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.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_F66v5aVrYMV6mM_9s_QaY","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agentdiet.dev","brandSlug":"agentdiet-dev-mpp","brandBaseUrl":"https://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 markdown code fences — can you repair it so my pipeline can parse it: ```json {\"name\": \"Alice\", \"score\": 42,} ```","exampleUseCases":[{"title":"Fixing LLM output in agent pipeline","prompt":"My AI agent returned this malformed JSON with trailing commas and single-quoted keys and my downstream parser is crashing — fix it for me: {'name': 'Bob', 'score': 95,}"},{"title":"Stripping markdown fences from AI response","prompt":"The model wrapped its JSON output in markdown code fences and now I can't parse it — clean it up and give me valid JSON: ```json {\"items\": [1, 2, 3,]} ```"},{"title":"Repairing truncated JSON from LLM","prompt":"My LLM response got cut off mid-generation and the JSON is truncated — can you repair this so it's valid and complete: {\"user\": \"Carol\", \"tags\": [\"admin\", \"editor\""}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed or truncated input, with issues like trailing commas, markdown fences, single quotes, and truncation resolved so it can be safely parsed by downstream systems","failureModes":["Input JSON is too severely corrupted to deterministically repair — returns error indicating unrecoverable structure","Input string is completely empty or not JSON-like at all — returns validation error","Ambiguous truncation point where multiple valid repairs are possible — may return best-effort result with caveat","Service returns 402 Payment Required if x402 micropayment is not provided or insufficient"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline produces JSON that fails standard parsing due to common LLM artifacts like trailing commas, markdown code fences, single-quoted keys, or truncation. Ideal for agent orchestration layers that need a deterministic, automated repair step before passing data downstream, especially when you cannot afford pipeline crashes and need a fast, cheap ($0.002/call) fix rather than re-prompting the LLM.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T06:31:02.747Z","isFirstParty":false,"canonicalSlug":"agentdiet-dev-deterministic-a2a-broken-json-repair-schema-validator-dd9f7439"}