# JSON Validator with Type, Size, and Depth Analysis

> JSON Validator with Type, Size, and Depth Analysis is a paid API for AI agents from json-data-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Validates a JSON string and returns parse errors with line/column position, or reports the root type, character count, and nesting depth if valid.

## Facts

- Endpoint: GET https://json-data-tools.x402tookit.com/json-validate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-validator-with-type-size-and-depth-analysis-5af45cac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mFY_bAtqoSaXEhUV09suM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability json-validator-with-type-size-and-depth-analysis-5af45cac
```

Example prompt: 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,}'

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Check whether text is valid JSON; if not, return the error with line and column. If valid, report type, size and depth.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-validator-with-type-size-and-depth-analysis-5af45cac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from json-data-tools.x402tookit.com](https://www.zero.xyz/host/json-data-tools.x402tookit.com/llms.txt)
