{"uid":"cap_iDq6MeUb5gWuAnHUsFZEi","slug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-99179dbc","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/llm-json-schema-healer)","url":"https://x402broker.com/v1/llm-json-schema-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_vnak6LO0TqhMfQELDxE1I","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 is broken — it has trailing commas, markdown code fences, and single quotes — can you repair it so it's valid JSON I can actually parse? Here's the raw string: ```json {name: 'Alice', age: 30,}```","exampleUseCases":[{"title":"Fix LLM output in agent pipeline","prompt":"The language model just returned this garbled JSON with trailing commas and markdown fences that's crashing my pipeline — can you repair it into valid JSON? Here it is: ```json {'user': 'bob', 'score': 42,}```"},{"title":"Repair truncated JSON from AI model","prompt":"My AI model cut off mid-response and the JSON is truncated and invalid — can you fix this broken JSON so I can extract the data from it? The raw string is: {\"items\": [{\"id\": 1, \"name\": \"widget\""},{"title":"Normalize single-quoted JSON before schema validation","prompt":"I got back JSON that uses single quotes instead of double quotes from an LLM — can you convert it to proper JSON so I can validate it against my schema? Here's the string: {'product': 'laptop', 'price': 999}"}],"resultDescription":"Returns a repaired, valid JSON object where the original malformed, truncated, or markdown-wrapped input has been deterministically fixed — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing and processing.","failureModes":["Input JSON is too severely corrupted to deterministically repair","Ambiguous truncation point where multiple valid completions exist","Input string is not JSON-like at all (plain text, binary data)","Extremely long JSON strings may hit query parameter length limits when passed via GET","Schema mismatch if the repaired JSON still doesn't conform to an expected schema"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, rule-based JSON repair rather than an LLM-based or probabilistic fix — ideal for multi-agent pipelines where consistency and reliability are critical, and when LLM outputs frequently contain predictable syntax errors like trailing commas, markdown fences, or single quotes. Prefer this over writing custom regex or using a general-purpose LLM to fix JSON, as it is purpose-built for this narrow transformation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:24:32.839Z","isFirstParty":false,"canonicalSlug":"x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8"}