{"uid":"cap_rfnvU8F6I16TIffyzCWAA","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ba481295","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://defi-yield.agentdiet.dev/v1/json-validator)","url":"https://defi-yield.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_3naqcR-nSYoLTSi2cYxxr","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"defi-yield.agentdiet.dev","brandSlug":"defi-yield-agentdiet-dev-mpp","brandBaseUrl":"https://defi-yield.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 has trailing commas and markdown fences and is crashing my pipeline — can you repair it and give me back valid, parseable JSON? Here's the raw output: ```{\"name\": \"Alice\", \"score\": 42,}```","exampleUseCases":[{"title":"LLM output crashing agent pipeline","prompt":"My language model just returned this JSON with a trailing comma and it's breaking my downstream agent — can you fix it so it parses cleanly? Here's the broken output: {\"items\": [\"apple\", \"banana\",], \"count\": 2}"},{"title":"Stripping markdown fences from structured output","prompt":"The AI returned its JSON wrapped in triple-backtick markdown fences and my parser is choking on it — can you strip the fences and repair the JSON so I get a clean object back? The raw string is: ```json\n{\"status\": \"ok\", \"value\": 99}\n```"},{"title":"Single-quoted JSON from legacy prompt template","prompt":"I have a JSON string that uses single quotes instead of double quotes because of an old prompt template — can you convert it to valid JSON? Here it is: {'user': 'bob', 'active': true}"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input, with issues like trailing commas, markdown code fences, single-quoted keys/values, and truncation corrected deterministically so it can be safely parsed by downstream systems.","failureModes":["Input is so heavily truncated or corrupted that no valid JSON structure can be inferred — returns an error indicating unrecoverable input","Input string is empty or whitespace — rejected due to minLength:1 constraint","Payment not provided or insufficient — HTTP 402 returned requiring x402 micropayment","Non-JSON input (e.g. plain text, HTML) that cannot be coerced into any JSON structure"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse() due to common LLM formatting errors like trailing commas, markdown code fences, single quotes, or truncation. Ideal for hardening agentic workflows that consume structured LLM outputs without requiring a full JSON schema up front.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:19.023Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}