{"uid":"cap_S63BS6e0NfRVMWq4NgpHQ","slug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-475ce586","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://domain-osint.agentdiet.dev/v1/json-fix)","url":"https://domain-osint.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_4BgY_J22UxMoS8A-ebQvs","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"domain-osint.agentdiet.dev","brandSlug":"domain-osint-agentdiet-dev-mpp","brandBaseUrl":"https://domain-osint.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 from the LLM is broken — it has trailing commas and markdown code fences and won't parse. Can you fix it so I can use it? Here it is: ```json {\"name\": \"Alice\", \"age\": 30, } ```","exampleUseCases":[{"title":"Fixing LLM output before downstream use","prompt":"The LLM just returned this JSON but it has trailing commas and it won't parse — can you repair it so my pipeline can continue? Here's the raw output: {\"status\": \"ok\", \"items\": [1, 2, 3,]}"},{"title":"Stripping markdown fences from agent response","prompt":"My agent wrapped its JSON in triple backtick markdown fences and now it's crashing my parser. Can you clean it up and give me valid JSON? The raw string is: ```json\n{\"result\": true}\n```"},{"title":"Recovering truncated JSON from a long generation","prompt":"The model got cut off mid-generation and the JSON is incomplete — it ends abruptly at 'user': 'Bob'. Can you deterministically repair and close it so it's valid JSON I can work with?"}],"resultDescription":"A repaired, valid JSON object reconstructed from the malformed input. The endpoint deterministically fixes common LLM JSON issues including trailing commas, markdown fences, single-quoted strings, and truncation, returning a parseable JSON structure.","failureModes":["Input is so severely malformed that deterministic repair is impossible — returns error","Input is not JSON-like at all (plain text, binary) — returns parse failure","Truncation is too deep to infer correct closing structure — may return partially repaired output","Empty or whitespace-only raw_json input — returns validation error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair for LLM-generated outputs in automated pipelines where reliability matters. Prefer it over ad-hoc string manipulation or asking the LLM to self-correct, especially when dealing with consistent failure patterns like trailing commas, markdown wrapping, or single quotes. Ideal for multi-agent orchestration layers that need fast, predictable JSON normalization without re-querying the LLM.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:17.025Z","isFirstParty":false,"canonicalSlug":"domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-544ae7e3"}