{"uid":"cap_M9REJWVup-ibnR9XZpCRD","slug":"saylor-innovations-json-validator-cd2e0fcc","name":"Saylor Innovations JSON Validator","description":"JSON validator - checks whether text is valid JSON, with type, size, depth, key count and error line and column","url":"https://saylorinnovations.com/api/json/validate?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["json"],"properties":{"json":{"type":"string","description":"JSON text to validate (max 100,000 chars)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["valid"],"properties":{"line":{"type":["number","null"],"description":"Line number or text of the line"},"type":{"type":"string","description":"Type or kind"},"bytes":{"type":"number","description":"Size in bytes"},"error":{"type":"string","description":"Error message, if any"},"valid":{"type":"boolean","description":"True when the input passed validation"},"column":{"type":["number","null"]},"max_depth":{"type":"number","description":"Max depth"},"checked_at":{"type":["string","null"],"description":"Time the check was run (UTC)"},"total_keys":{"type":"number","description":"Total keys"},"top_level_items":{"type":["number","null"],"description":"Top level items"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IGOAgwlw0ofc1f6jJAVzE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates whether a string is valid JSON and returns structural metadata including type, size, depth, key count, and error location","exampleAgentPrompt":"Can you check if this JSON is valid and tell me where the error is if it isn't: '{\"name\": \"Alice\", \"age\": 30, \"address\": {\"city\": \"New York\"}'","exampleUseCases":[{"title":"Debug malformed API response","prompt":"This JSON response from an API is failing to parse in my app — can you check if it's valid JSON and tell me exactly which line and column has the error: '{\"users\":[{\"id\":1,\"name\":\"Bob\"},{\"id\":2,\"name\":}'"},{"title":"Pre-flight check before data ingestion","prompt":"Before I store this config file, can you validate it's proper JSON and also tell me how deeply nested it is and how many total keys it has?"},{"title":"Automated pipeline JSON gate","prompt":"I have this string coming out of a text processing step — validate whether it's valid JSON, and if not, give me the error message and location so I can flag the record for review."}],"resultDescription":"Returns a JSON object with: a boolean 'valid' field indicating whether the input is valid JSON; 'type' describing the JSON value type (object, array, string, etc.); 'bytes' for size; 'max_depth' for nesting depth; 'total_keys' for key count; 'top_level_items' for array/object size at root; and on failure, 'error' message plus 'line' and 'column' pinpointing where parsing failed. Also includes 'checked_at' UTC timestamp.","failureModes":["Input JSON text exceeds 100,000 character limit — request rejected","Missing required 'json' query parameter — validation cannot proceed","Network or server error returns non-200 response","Payment of $0.01 USDC not fulfilled via x402 protocol — 402 response returned","Malformed query string encoding causes incorrect JSON to be received"],"whenToPreferThis":"Choose this endpoint when you need to validate JSON syntax and simultaneously get structural metadata (depth, key count, size, error location) in a single call. It is ideal for developer tools, data pipelines, or agent workflows that need to gate on JSON correctness before further processing. Prefer it over client-side parsing when you need a neutral third-party validation with rich diagnostic output including exact error line and column.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:41:43.007Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-json-validator-cd2e0fcc"}