{
  "slug": "json-schema-batch-validate",
  "name": "gizza-ai/json-schema-batch-validate",
  "version": "0.1.0",
  "title": "JSON Schema Batch Validator — Array & NDJSON — gizza.ai",
  "description": "Validate a JSON array or NDJSON batch against one JSON Schema. Get a pass/fail summary plus per-record errors with JSON Pointer paths — locally in your browser.",
  "tags": [
    "json schema validator",
    "batch json validator",
    "ndjson validator",
    "json schema draft",
    "validate json records",
    "json pointer errors",
    "jsonschema",
    "bulk json validation"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/json-schema-batch-validate/",
    "markdown": "https://gizza.ai/tools/json-schema-batch-validate/index.md",
    "descriptor": "https://gizza.ai/tools/json-schema-batch-validate/tool.json",
    "deep_link_example": "https://gizza.ai/tools/json-schema-batch-validate/?schema=%7B%22type%22%3A%22object%22%2C%22required%22%3A%5B%22id%22%2C%22name%22%5D%2C%22properties%22%3A%7B%22id%22%3A%7B%22type%22%3A%22integer%22%7D%2C%22name%22%3A%7B%22type%22%3A%22string%22%7D%7D%7D&records=%5B%7B%22id%22%3A1%2C%22name%22%3A%22Ada%22%7D%2C%7B%22id%22%3A%222%22%2C%22name%22%3A%22Grace%22%7D%2C%7B%22name%22%3A%22Kay%22%7D%5D&input_format=auto&draft=auto&max_errors=50&output=text"
  },
  "cli": "gizza tool json-schema-batch-validate '{\"type\":\"object\",\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"type\":\"integer\"},\"name\":{\"type\":\"string\"}}}' 'records=[{\"id\":1,\"name\":\"Ada\"},{\"id\":\"2\",\"name\":\"Grace\"},{\"name\":\"Kay\"}]'",
  "tool": {
    "description": "Validate a whole BATCH of JSON records against ONE JSON Schema and return a pass/fail summary plus a per-record error list. 'records' can be a JSON array of records, a single JSON value (one record), or an NDJSON stream (one JSON value per line) — set input_format to auto (default), json, or ndjson. Each error carries the failing value's JSON Pointer path, the schema keyword that rejected it (type, required, minimum, enum, pattern, …), and a message. Set draft to auto (detect from the schema's $schema, else draft2020-12) or force draft4/draft6/draft7/draft2019-09/draft2020-12 for reporting; validation covers a common draft-agnostic subset. max_errors caps how many errors are listed (counts stay exact). Set output to text (default, human report) or json (machine-readable report). Runs locally; no network, no external $ref fetching.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "draft": {
          "default": "auto",
          "description": "Draft label to report. 'auto' (default) reads the schema's \"$schema\" URI and falls back to draft2020-12 if absent/unrecognized; otherwise force one of draft4, draft6, draft7, draft2019-09, draft2020-12. Validation covers a common draft-agnostic keyword subset.",
          "enum": [
            "auto",
            "draft4",
            "draft6",
            "draft7",
            "draft2019-09",
            "draft2020-12"
          ],
          "type": "string"
        },
        "input_format": {
          "default": "auto",
          "description": "How to parse records. 'auto' (default) tries whole-document JSON first (an array becomes the batch, any other value is one record), then falls back to NDJSON. 'json' forces JSON, 'ndjson' forces one-JSON-value-per-line.",
          "enum": [
            "auto",
            "json",
            "ndjson"
          ],
          "type": "string"
        },
        "max_errors": {
          "default": 50,
          "description": "Cap on how many individual errors are LISTED across the whole batch (default 50). Per-record and total error COUNTS are always exact and uncapped; when more errors exist than are listed the report is marked truncated.",
          "minimum": 1,
          "type": "integer"
        },
        "output": {
          "default": "text",
          "description": "Output format. 'text' (default) is a human-readable PASS/FAIL summary with a per-record error breakdown. 'json' is the full machine-readable report object (valid, draft, input_format, total, passed, failed, total_errors, records[], truncated).",
          "enum": [
            "text",
            "json"
          ],
          "type": "string"
        },
        "records": {
          "description": "The batch of records to validate. Accepts a JSON array of records ([{...},{...}]), a single JSON value (validated as one record), or an NDJSON stream (one JSON value per line, blank lines skipped). See input_format to force one interpretation.",
          "type": "string"
        },
        "schema": {
          "description": "The JSON Schema to validate every record against, as a JSON object. Example: {\"type\":\"object\",\"required\":[\"id\"],\"properties\":{\"id\":{\"type\":\"integer\"}}}. If it carries a \"$schema\" URI and draft is 'auto', the draft is detected from it.",
          "type": "string"
        }
      },
      "required": [
        "schema",
        "records"
      ],
      "type": "object"
    }
  }
}