{"uid":"cap_XdXe3xLUk5FQod8eJk2Uy","slug":"verifylite-json-sanitizer-schema-validator-40c40609","name":"VerifyLite JSON Sanitizer & Schema Validator","description":"Turns messy LLM output into valid JSON: strips Markdown code fences and surrounding prose, fixes trailing commas, single quotes, unquoted keys, comments, Python True/None, cut-off brackets, and stringified JSON. Optionally validates the result against a JSON Schema (draft 4 to 2020-12) and lists each error with its location. Returns the parsed data, the JSON text, and what was changed. Not charged if no JSON can be recovered or the input is invalid.","url":"https://verifylite.hydratinghealingtouch.workers.dev/sanitize-json?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"The broken JSON or LLM reply, up to 30,000 characters."},"schema":{"type":"object","description":"Optional JSON Schema to validate the repaired data against."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0039","displayCostAsset":"USDC","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.0039/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0039","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0039","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UEWHrC1Hnr8HqJnnYlzQ5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0039","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs malformed LLM JSON output by stripping Markdown fences, fixing syntax errors, and optionally validating against a JSON Schema","exampleAgentPrompt":"The LLM gave me this messy response with markdown code fences and trailing commas — can you clean it up and validate it against this schema: {\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}}}?","exampleUseCases":[{"title":"Fixing LLM pipeline JSON output","prompt":"My AI pipeline returned this response with backtick fences and Python True values instead of valid JSON — can you repair it and tell me what was changed so I can use it in my code?"},{"title":"Schema-validated agent response parsing","prompt":"Take this raw LLM reply and both fix any JSON syntax issues and check it against this schema to make sure all required fields are present and correctly typed: {\"type\":\"object\",\"required\":[\"id\",\"status\"],\"properties\":{\"id\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}"},{"title":"Recovering truncated JSON from model output","prompt":"This JSON response looks like it got cut off mid-way through — can you try to recover and complete the structure so I can parse it programmatically?"}],"resultDescription":"Returns a parsed data object (the repaired JSON parsed into native types), the repaired JSON as a string, a list of transformations applied (e.g. stripped code fences, fixed trailing commas), and if a JSON Schema was provided, a list of validation errors with their locations. If no valid JSON can be recovered, no charge is applied.","failureModes":["Input contains no recoverable JSON structure — returns error indicating nothing could be repaired, no charge applied","Input exceeds 30,000 character limit — returns a size error","Provided JSON Schema is itself malformed — schema validation step may fail or be skipped","JSON is repaired but fails schema validation — returns repaired JSON plus list of schema errors","Network timeout to Cloudflare Worker — returns connection error","x402 payment failure or insufficient USDC balance — returns payment required error"],"whenToPreferThis":"Choose this endpoint when you need to reliably parse JSON emitted by an LLM that may include Markdown code fences, prose wrapping, Python-style booleans/nulls, trailing commas, single-quoted strings, unquoted keys, or truncated brackets. It is especially useful in agentic pipelines where structured LLM output must be validated against a known schema before downstream use. Prefer it over a simple JSON.parse() call whenever LLM output quality cannot be guaranteed, or when schema conformance is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:30:24.520Z","isFirstParty":false,"canonicalSlug":"verifylite-json-sanitizer-schema-validator-40c40609"}