{"uid":"cap_ycg7237hoBdhcQ1LHnYRM","slug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-b58d1bba","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://x402broker.com/v1/malformed-json-healer)","url":"https://x402broker.com/v1/malformed-json-healer?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_83RaVkta2DBKbIItYwINn","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"x402broker.com","brandSlug":"x402broker-com-mpp","brandBaseUrl":"https://x402broker.com","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 output has trailing commas and markdown code fences and won't parse — can you repair it and give me back clean, valid JSON? Here it is: ```json {\"name\": \"Alice\", \"age\": 30,} ```","exampleUseCases":[{"title":"Fix LLM pipeline JSON crashes","prompt":"The language model just returned this broken JSON with trailing commas and it's crashing my pipeline — repair it so I can continue processing: {\"results\": [\"item1\", \"item2\",], \"count\": 2,}"},{"title":"Strip markdown fences from agent output","prompt":"My coding agent wrapped its JSON response in triple-backtick markdown fences and now I can't parse it — can you clean it up and return valid JSON? Here's the raw output: ```json\n{\"status\": \"ok\", \"data\": {\"value\": 42}}\n```"},{"title":"Repair single-quoted JSON from scraper","prompt":"I've got a JSON-like string from a web scraper that uses single quotes instead of double quotes and it won't parse — fix it into proper JSON: {'user': 'bob', 'active': true, 'score': 98}"}],"resultDescription":"A repaired, syntactically valid JSON object with all common malformations corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for immediate programmatic use.","failureModes":["JSON is so severely truncated or corrupted that it cannot be deterministically repaired, returning an error","Input that is not JSON-like at all (plain text, binary) may fail with a parse error","Edge cases in deeply nested truncated structures may produce structurally valid but semantically incorrect repairs","Network timeout or upstream service unavailability returns a 5xx error","Missing required raw_json parameter returns a 400 validation error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, rule-based JSON repair rather than probabilistic LLM-based re-generation — ideal for multi-agent pipelines where reliability and consistency matter. Best when the input is recognizably JSON-like but syntactically broken due to common LLM output artifacts (trailing commas, markdown wrapping, single quotes, truncation). Prefer alternatives if you need semantic correction or schema coercion beyond syntactic repair.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:25:57.418Z","isFirstParty":false,"canonicalSlug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8"}