{"uid":"cap_E3rXu8aALifxK1ASkBMWd","slug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8d60df6e","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-fix)","url":"https://defi-yield.agentdiet.dev/v1/json-fix?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_w7AX4jCPnwl_K4JhiRnEq","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) into valid JSON so multi-agent pipelines don't crash","exampleAgentPrompt":"The LLM just returned this broken JSON with trailing commas and markdown fences — can you fix it so it parses cleanly: ```{\"name\": \"Alice\", \"score\": 42,}```?","exampleUseCases":[{"title":"Fix LLM pipeline JSON crash","prompt":"My agent pipeline keeps crashing because the model returns JSON wrapped in markdown code fences with trailing commas — can you repair this string so it's valid JSON: ```{\"status\": \"ok\", \"items\": [1, 2, 3,],}```?"},{"title":"Repair truncated agent response","prompt":"The LLM truncated its output mid-way and I got this incomplete JSON: '{\"user\": \"bob\", \"data\": {\"score\": 99' — can you fix it into something parseable?"},{"title":"Sanitize single-quoted JSON output","prompt":"The model returned JSON using single quotes instead of double quotes: {'name': 'Alice', 'age': 30} — please repair it into proper valid JSON so I can pass it to the next step in my workflow."}],"resultDescription":"A JSON object containing the repaired, valid JSON reconstructed from the malformed input. The output should be parseable by any standard JSON parser without errors.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns an error indicating the JSON could not be recovered","Empty or null raw_json input — returns validation error","Input is not JSON at all (e.g. plain prose text) — repair may fail or produce incorrect output","Extremely long or deeply nested truncated JSON may result in incomplete repair"],"whenToPreferThis":"Choose this endpoint when your multi-agent or LLM pipeline receives JSON outputs that fail standard parsing due to common LLM formatting artifacts — trailing commas, markdown code fences, single quotes, or truncation. It is especially useful as a middleware step between LLM generation and downstream JSON consumers to prevent pipeline crashes. Prefer it over writing custom regex-based fixers when you need a deterministic, reliable, pay-per-call solution.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T06:43:43.587Z","isFirstParty":false,"canonicalSlug":"defi-yield-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ff23e186"}