{"uid":"cap_AMRir53RtRYzIK1SslWig","slug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-31baff7b","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-validator)","url":"https://sec-intel.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_28jPdm71lFIiONWi69v7l","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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash","exampleAgentPrompt":"The LLM output I got back has trailing commas, single quotes, and a markdown code fence wrapping the JSON — can you repair it into valid JSON so I can pass it to the next step? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```","exampleUseCases":[{"title":"Fix LLM response before pipeline continues","prompt":"My language model returned this JSON but it's wrapped in triple backticks and has trailing commas — fix it into clean valid JSON so my pipeline doesn't crash: ```{\"user\": \"bob\", \"score\": 95,}```"},{"title":"Repair single-quoted JSON from agent output","prompt":"An agent in my workflow returned JSON using single quotes instead of double quotes and it's breaking my parser — can you repair this into valid JSON: {'items': ['apple', 'banana'], 'count': 2}"},{"title":"Recover truncated JSON from LLM","prompt":"The model's response got cut off mid-JSON and now it's invalid — try to repair this truncated string into the most complete valid JSON you can: {\"results\": [{\"id\": 1, \"title\": \"foo\"}, {\"id\": 2, \"title\":"}],"resultDescription":"A repaired, valid JSON object derived from the input malformed string, with syntax issues such as trailing commas, single quotes, markdown code fences, and truncation resolved deterministically. The response is a JSON object containing the fixed output ready for downstream consumption.","failureModes":["Input JSON is too severely truncated or corrupted to recover — returns an error or best-effort partial result","Input contains nested markdown with ambiguous structure — repair heuristics may produce unexpected results","Extremely large JSON strings may exceed query parameter length limits when sent via GET","Ambiguous single-quote vs apostrophe usage in string values may cause incorrect repair"],"whenToPreferThis":"Choose this endpoint when an LLM or agent in your pipeline has returned broken, truncated, or markdown-wrapped JSON that must be repaired before downstream processing. It is purpose-built for multi-agent and MCP pipeline reliability, offering deterministic (not probabilistic) repair rather than asking another LLM to re-generate the output. Prefer it over a general-purpose LLM re-call when you need low latency, low cost, and predictable behavior at $0.002 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:44:17.893Z","isFirstParty":false,"canonicalSlug":"sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-01a54acc"}