{"uid":"cap_mFY_bAtqoSaXEhUV09suM","slug":"json-validator-with-type-size-and-depth-analysis-5af45cac","name":"JSON Validator with Type, Size, and Depth Analysis","description":"Check whether text is valid JSON; if not, return the error with line and column. If valid, report type, size and depth.","url":"https://json-data-tools.x402tookit.com/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":"The JSON text, up to 4000 characters"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"type":{"type":["null","string"]},"depth":{"type":["null","number"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"characters":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"topLevelCount":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rsTVHaiJQm5dxog8--K8d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON string and returns parse errors with line/column position, or reports the root type, character count, and nesting depth if valid.","exampleAgentPrompt":"Can you check if this string is valid JSON and, if not, tell me the exact line and column of the error: '{\"name\": \"Alice\", \"age\": 30, \"active\": true,}'","exampleUseCases":[{"title":"Debug malformed API response","prompt":"I'm getting a parse error on this JSON response from a third-party API — can you validate it and tell me exactly where the syntax error is: '{\"status\":\"ok\",\"data\":[1,2,3,}'"},{"title":"Pre-flight check before data ingestion","prompt":"Before I feed this config file into our pipeline, can you confirm it's valid JSON and tell me its root type, how many top-level keys it has, and how deep the nesting goes? Here's the text: '{\"version\":\"1.0\",\"settings\":{\"timeout\":30,\"retries\":3}}'"},{"title":"Validate user-submitted JSON input","prompt":"A user just submitted this JSON in our form — can you check whether it's valid and report the character count and nesting depth? The text is: '[{\"id\":1,\"tags\":[\"a\",\"b\"]},{\"id\":2,\"tags\":[\"c\"]}]'"}],"resultDescription":"Returns a verdict (valid or invalid), and if invalid, an array of reasons with error details including line and column. If valid, returns the root type (object, array, string, number, boolean, null), total character count, nesting depth, and top-level key or element count. Also includes a summary string and timestamp.","failureModes":["Input JSON text exceeds 4000 characters — request will be rejected or truncated","Empty or missing json query parameter — returns an error response","Network timeout on the x402-gated endpoint","Payment failure if USDC balance is insufficient for the $0.02 fee"],"whenToPreferThis":"Use this endpoint when you need to quickly validate a JSON string and get actionable error location (line + column) for debugging, or want structural metadata (type, depth, size) without fully parsing the document yourself. Ideal for agents that receive user-supplied or third-party JSON and need a lightweight sanity check before downstream processing. Prefer this over a full JSON parser when you only need validation status and basic stats rather than the actual data values.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:11:25.819Z","isFirstParty":false,"canonicalSlug":"json-validator-with-type-size-and-depth-analysis-5af45cac"}