{"uid":"cap_XJcp3SW8VK-gJpnqlFWWm","slug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8f13a6e4","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://sec-intel.agentdiet.dev/v1/json-fix)","url":"https://sec-intel.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_6l62CtMawSdEPRIPciB0F","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"sec-intel.agentdiet.dev","brandSlug":"sec-intel-agentdiet-dev-mpp","brandBaseUrl":"https://sec-intel.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs so multi-agent pipelines can safely parse downstream responses","exampleAgentPrompt":"This JSON from the LLM response is broken — it has trailing commas, markdown code fences, and single quotes — can you repair it into valid JSON so I can continue processing it?","exampleUseCases":[{"title":"Fix LLM response in agent pipeline","prompt":"The language model just returned a JSON blob wrapped in triple backticks with a trailing comma — fix it so my downstream parser can read it without crashing."},{"title":"Sanitize single-quoted JSON from model","prompt":"I got this JSON back from the AI but it's using single quotes instead of double quotes and has some extra commas — can you clean it up into proper valid JSON?"},{"title":"Recover truncated JSON output","prompt":"The model's JSON output got cut off mid-structure and now my pipeline is failing — repair whatever you can from this truncated JSON string and give me back something parseable."}],"resultDescription":"A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for safe downstream parsing in agent pipelines.","failureModes":["JSON is so severely truncated that repair is impossible — returns error or best-effort partial object","Input is not JSON at all (e.g. plain text or binary) — may return error or empty object","Extremely large JSON strings may hit query parameter length limits since raw_json is passed as a GET query parameter","Ambiguous structure in deeply nested truncated JSON may result in incorrect repair assumptions"],"whenToPreferThis":"Choose this endpoint when your multi-agent pipeline needs a deterministic, fast, non-AI-based JSON repair — especially when LLM outputs frequently contain markdown fences, trailing commas, or single quotes. Prefer this over writing custom regex sanitizers or calling another LLM to fix JSON, as it provides consistent, reproducible repairs without hallucination risk.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:21:49.109Z","isFirstParty":false,"canonicalSlug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-01a54acc"}