# JSON Schema

> Validate JSON data against JSON Schema, the standard for describing JSON. Check any value, or every item of a list, against a schema given as an object, text, a file or a link, in any dialect from Draft 3 to Draft 2020-12, and get each error in plain words. Check a schema for mistakes, create one from example data, look up keywords in json-schema.org's reference, and find JSON Schema tools and how much of the official test suite each validator passes. No account or API key required.

App · Utilities · 8 actions. Web page: https://docs.lodol.com/docs/integrations/json-schema

## Actions

### Check a schema

Check that a JSON Schema is valid: against its dialect's meta-schema, with every $ref followed, and for the mistakes validators pass over in silence, such as a misspelled keyword, a format that does not exist, keywords ignored beside $ref and limits nothing can meet. No API key required.

**Inputs**

- Schema (`schema`, text, required): The JSON Schema: an object from an earlier step, JSON text, an uploaded .json file, or the web address of one, such as https://json.schemastore.org/package.json. Its $ref links to other schemas on the web are followed.
- Dialect (`dialect`, text): Which version of JSON Schema to read the schema as. Leave it on the schema's own to follow its $schema, which is Draft 2020-12 when it has none; choose a draft to read it that way whatever it declares. One of: `auto` (The schema's own $schema (Draft 2020-12 if none)), `2020-12` (Draft 2020-12), `2019-09` (Draft 2019-09), `draft-07` (Draft 7), `draft-06` (Draft 6), `draft-04` (Draft 4), `draft-03` (Draft 3). Default: `auto`.
- Most errors to list (`max_errors`, number): How many errors to list, from 1 to 1,000; 100 by default. All of them are counted either way. From 1 to 1000. Default: `100`.

**Outputs**

- `dialect` (text): The $schema URI of the dialect the schema was read as, e.g. 'https://json-schema.org/draft/2020-12/schema'.
- `dialect_name` (text): That dialect's name, e.g. 'Draft 2020-12'.
- `dialect_note` (text): Why the schema was read as a dialect other than the one it declares, such as a $schema this step does not know. Null when it was read as declared.
- `error_count` (number): How many errors the schema has.
- `errors` (list): The errors, up to the most asked for.
- `summary` (text): What happened, in a sentence or two.
- `valid` (true/false): True when the schema passes its meta-schema and every $ref leads somewhere. Warnings do not count.
- `warning_count` (number): How many warnings there are.
- `warnings` (list): Mistakes validators pass over, one per keyword for keywords used more than once.

**Example output**

```json
{
  "dialect": "https://json-schema.org/draft/2020-12/schema",
  "dialect_name": "Draft 2020-12",
  "dialect_note": null,
  "error_count": 1,
  "errors": [
    {
      "keyword": "$ref",
      "message": "A $ref points at #/$defs/tag, where the schema has nothing. Did you mean #/$defs/tags?",
      "schema_location": "/properties/tags/items/$ref"
    }
  ],
  "summary": "Not a valid Draft 2020-12 schema: 1 error. At /properties/tags/items/$ref: A $ref points at #/$defs/tag, where the schema has nothing. Did you mean #/$defs/tags? 2 warnings: At /properties/age/minimun: minimun is not a JSON Schema keyword, so validators ignore it. Did you mean minimum? At /properties/created/format: \"datetime\" is not a format Draft 2020-12 defines, so validators do not check it. Did you mean \"date-time\"?",
  "valid": false,
  "warning_count": 2,
  "warnings": [
    {
      "keyword": "minimun",
      "kind": "unknown_keyword",
      "message": "minimun is not a JSON Schema keyword, so validators ignore it. Did you mean minimum?",
      "occurrences": 1,
      "schema_location": "/properties/age/minimun"
    },
    {
      "keyword": "format",
      "kind": "unknown_format",
      "message": "\"datetime\" is not a format Draft 2020-12 defines, so validators do not check it. Did you mean \"date-time\"?",
      "occurrences": 1,
      "schema_location": "/properties/created/format"
    }
  ]
}
```

### Create a schema from examples

Create a JSON Schema from example data, such as an API response or a few records: the types, properties, required fields and common formats it finds, ready to validate later data with. No API key required.

**Inputs**

- Example data (`examples`, text, required): The data to describe, such as an API response, a webhook payload or some records from an earlier step: an object, a list or any JSON value, as JSON text too, or an uploaded .json file.
- Each item is an example (`list_of_examples`, true/false): Turn on when the example data is a list of separate examples, such as several webhook payloads: the schema then describes one of them. Off, a list is one example, and the schema describes the whole list. Default: `false`.
- Dialect (`dialect`, text): Which version of JSON Schema to write the schema in; Draft 2020-12, the current one, by default. Choose an older draft for a tool that needs one, such as Draft 7. One of: `2020-12` (Draft 2020-12), `2019-09` (Draft 2019-09), `draft-07` (Draft 7), `draft-06` (Draft 6), `draft-04` (Draft 4). Default: `2020-12`.
- Mark properties required (`mark_required`, true/false): List the properties every example has as required. On by default; turn it off to make every property optional. Default: `true`.
- Allow no other properties (`no_additional_properties`, true/false): Refuse objects with properties the examples did not have, by setting additionalProperties to false on every object. Off by default, so new properties still pass. Default: `false`.
- Detect formats (`detect_formats`, true/false): Add a format where every example value has one: date-time, date, time, email, uuid or uri (a web address). On by default. Default: `true`.
- Title (`title`, text): Optional. A title for the schema, such as 'Order'.
- Description (`description`, text): Optional. A description for the schema, saying what it describes.

**Outputs**

- `example_count` (number): How many examples it was made from.
- `property_count` (number): How many properties it describes, at every depth.
- `schema` (object): The schema, with its $schema, ready to use as the schema of a validation step.
- `summary` (text): What happened, in a sentence or two.

**Example output**

```json
{
  "example_count": 2,
  "property_count": 6,
  "schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
      "created": {
        "format": "date-time",
        "type": "string"
      },
      "email": {
        "format": "email",
        "type": "string"
      },
      "id": {
        "format": "uuid",
        "type": "string"
      },
      "note": {
        "type": "null"
      },
      "tags": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id",
      "email",
      "created",
      "total",
      "tags"
    ],
    "title": "Order",
    "type": "object"
  },
  "summary": "A Draft 2020-12 schema for an object with 6 properties, from 2 examples."
}
```

### Find JSON Schema tools

Search json-schema.org's catalogue of JSON Schema tools (validators, code generators, editors, linters and more) by kind, programming language, dialect and words in the name or description, with which validators Bowtie tests. No API key required.

**Inputs**

- Search for (`query`, text): Optional. Words that must all appear in a tool's name or description, such as 'typescript generator'.
- Kind of tool (`tooling_type`, text): Optional. Only one kind of tool, such as Validator or Schema to code. One of: `validator`, `annotations`, `bundler`, `hyper-schema`, `benchmarks`, `documentation`, `LDO-utility` (LDO utility), `code-to-schema` (Code to schema), `data-to-schema` (Data to schema), `model-to-schema` (Model to schema), and 15 more.
- Language (`language`, text): Optional. Only tools for one programming language, as the catalogue names it, such as Python, JavaScript, TypeScript, Java, Go, Rust, C# or .NET.
- Supports (`dialect`, text): Optional. Only tools that say they support this dialect. One of: `2020-12` (Draft 2020-12), `2019-09` (Draft 2019-09), `7` (Draft 7), `6` (Draft 6), `5` (Draft 5), `4` (Draft 4), `3` (Draft 3).
- Include obsolete tools (`include_obsolete`, true/false): Also list tools the catalogue marks obsolete, which are no longer maintained. Off by default. Default: `false`.
- Only tools Bowtie tests (`bowtie_only`, true/false): Only the validators Bowtie runs against the official test suite, whose scores 'Get a validator's compliance' reads. Off by default. Default: `false`.
- Order (`sort`, text): By name, as json-schema.org lists them, or the most recently updated first. A tool the catalogue gives no date comes last. One of: `name` (By name), `last_updated` (Most recently updated first). Default: `name`.
- Most tools to return (`limit`, number): How many tools to return, from 1 to 300; 25 by default. From 1 to 300. Default: `25`.

**Outputs**

- `catalogue_size` (number): How many tools the catalogue has in all.
- `count` (number): How many tools are returned.
- `summary` (text): What happened, in a sentence or two.
- `tools` (list): The tools that match, up to the most asked for.
- `total_matches` (number): How many tools match, however many are returned.

**Example output**

```json
{
  "catalogue_size": 59,
  "count": 3,
  "summary": "4 tools of the 59 in json-schema.org's catalogue match: jschon, json-schema-utils, jsonschema, and 1 more.",
  "tools": [
    {
      "bowtie_id": "python-jschon",
      "bowtie_url": "https://bowtie.report/#/implementations/python-jschon",
      "compliance_note": null,
      "description": "An object-oriented JSON Schema implementation for Python.",
      "dialects": [
        "Draft 2020-12",
        "Draft 2019-09"
      ],
      "environments": [],
      "homepage": "https://jschon.readthedocs.io/",
      "languages": [
        "Python"
      ],
      "last_updated": "2022-08-31",
      "license": "MIT",
      "maintainers": [
        "Mark Joseph"
      ],
      "name": "jschon",
      "notes": null,
      "obsolete": false,
      "other_dialects": [],
      "source": "https://github.com/marksparkza/jschon",
      "tooling_types": [
        "validator"
      ]
    },
    {
      "bowtie_id": "python-jsu-compile",
      "bowtie_url": "https://bowtie.report/#/implementations/python-jsu-compile",
      "compliance_note": null,
      "description": "Random utilities to analyze and manipulate JSON Schema",
      "dialects": [
        "Draft 2020-12",
        "Draft 2019-09",
        "Draft 7",
        "Draft 6",
        "Draft 5",
        "Draft 4",
        "Draft 3",
        "Draft 2",
        "Draft 1"
      ],
      "environments": [],
      "homepage": "https://github.com/zx80/json-schema-utils",
      "languages": [
        "Python"
      ],
      "last_updated": null,
      "license": "Public Domain",
      "maintainers": [
        "zx80",
        "clairey-zx81"
      ],
      "name": "json-schema-utils",
      "notes": null,
      "obsolete": false,
      "other_dialects": [],
      "source": "https://github.com/zx80/json-schema-utils",
      "tooling_types": [
        "validator",
        "linter",
        "schema-to-types",
        "util-general-processing"
      ]
    },
    {
      "bowtie_id": "python-jsonschema",
      "bowtie_url": "https://bowtie.report/#/implementations/python-jsonschema",
      "compliance_note": null,
      "description": "An implementation of the JSON Schema specification for Python",
      "dialects": [
        "Draft 2020-12",
        "Draft 2019-09",
        "Draft 7",
        "Draft 6",
        "Draft 4",
        "Draft 3"
      ],
      "environments": [],
      "homepage": "https://python-jsonschema.readthedocs.io/",
      "languages": [
        "Python"
      ],
      "last_updated": "2022-11-09",
      "license": "MIT",
      "maintainers": [
        "Julian Berman"
      ],
      "name": "jsonschema",
      "notes": null,
      "obsolete": false,
      "other_dialects": [],
      "source": "https://github.com/python-jsonschema/jsonschema",
      "tooling_types": [
        "validator"
      ]
    }
  ],
  "total_matches": 4
}
```

### Get a validator's compliance

Get how much of the official JSON Schema Test Suite a validator passes, dialect by dialect, as Bowtie measures it, with its version, language and links. Name it by its Bowtie id, its name or its repository. No API key required.

**Inputs**

- Validator (`implementation`, text, required): The validator, as Bowtie knows it: its Bowtie id such as 'python-jsonschema' or 'js-ajv' (which 'Find JSON Schema tools' returns), its name, or its repository's address.

**Outputs**

- `dialects` (list): Each dialect Bowtie tests it on, newest first.
- `documentation` (text): Its documentation, or null.
- `homepage` (text): Its home page, or null.
- `id` (text): Its id on Bowtie, e.g. 'python-jsonschema'.
- `issues` (text): Where to report its bugs, or null.
- `language` (text): Its programming language, as Bowtie names it, e.g. 'python'.
- `name` (text): Its name, e.g. 'jsonschema'.
- `report_url` (text): Its full report on bowtie.report.
- `source` (text): Its source repository, or null.
- `summary` (text): What happened, in a sentence or two.
- `version` (text): The version Bowtie tested, or null.

**Example output**

```json
{
  "dialects": [
    {
      "dialect": "Draft 2020-12",
      "passing_percent": 99,
      "uri": "https://json-schema.org/draft/2020-12/schema"
    },
    {
      "dialect": "Draft 2019-09",
      "passing_percent": 99,
      "uri": "https://json-schema.org/draft/2019-09/schema"
    },
    {
      "dialect": "Draft 7",
      "passing_percent": 100,
      "uri": "http://json-schema.org/draft-07/schema#"
    },
    {
      "dialect": "Draft 6",
      "passing_percent": 100,
      "uri": "http://json-schema.org/draft-06/schema#"
    },
    {
      "dialect": "Draft 4",
      "passing_percent": 100,
      "uri": "http://json-schema.org/draft-04/schema#"
    },
    {
      "dialect": "Draft 3",
      "passing_percent": 100,
      "uri": "http://json-schema.org/draft-03/schema#"
    }
  ],
  "documentation": "https://python-jsonschema.readthedocs.io/",
  "homepage": "https://python-jsonschema.readthedocs.io/",
  "id": "python-jsonschema",
  "issues": "https://github.com/python-jsonschema/jsonschema/issues",
  "language": "python",
  "name": "jsonschema",
  "report_url": "https://bowtie.report/#/implementations/python-jsonschema",
  "source": "https://github.com/python-jsonschema/jsonschema",
  "summary": "jsonschema 4.26.0 (python) passes this share of the official test suite on Bowtie: Draft 2020-12 99%, Draft 2019-09 99%, Draft 7 100%, Draft 6 100%, Draft 4 100%, Draft 3 100%.",
  "version": "4.26.0"
}
```

### List the keywords of a dialect

List the keywords of a JSON Schema dialect, from Draft 3 to Draft 2020-12, with the vocabulary each belongs to, what kind of value it applies to and links to its documentation. No API key required.

**Inputs**

- Dialect (`dialect`, text): The dialect whose keywords to list; Draft 2020-12 by default. One of: `2020-12` (Draft 2020-12), `2019-09` (Draft 2019-09), `draft-07` (Draft 7), `draft-06` (Draft 6), `draft-04` (Draft 4), `draft-03` (Draft 3). Default: `2020-12`.
- Vocabulary (`vocabulary`, text): Optional. Only the keywords of one vocabulary, such as Validation. Vocabularies came with Draft 2019-09, so leave this empty for older drafts. One of: `core`, `applicator`, `unevaluated` (Unevaluated (Draft 2020-12)), `validation`, `meta-data`, `format-annotation` (Format Annotation (Draft 2020-12)), `format` (Format (Draft 2019-09)), `content`.

**Outputs**

- `count` (number): How many keywords there are.
- `dialect` (text): The dialect's $schema URI.
- `dialect_name` (text): That dialect's name, e.g. 'Draft 2020-12'.
- `keywords` (list): The keywords, in alphabetical order.
- `summary` (text): What happened, in a sentence or two.

**Example output**

```json
{
  "count": 20,
  "dialect": "https://json-schema.org/draft/2020-12/schema",
  "dialect_name": "Draft 2020-12",
  "keywords": [
    {
      "applies_to": "any",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/const",
      "keyword": "const",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/const",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "object",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/conditionals#dependentRequired",
      "keyword": "dependentRequired",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/dependentrequired",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "any",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/enum",
      "keyword": "enum",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/enum",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "number",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/numeric#range",
      "keyword": "exclusiveMaximum",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/exclusivemaximum",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "number",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/numeric#range",
      "keyword": "exclusiveMinimum",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/exclusiveminimum",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "array",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/array#mincontains-maxcontains",
      "keyword": "maxContains",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/maxcontains",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "number",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/numeric#range",
      "keyword": "maximum",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/maximum",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "array",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/array#length",
      "keyword": "maxItems",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/maxitems/",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "string",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/string#length",
      "keyword": "maxLength",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/maxlength",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "object",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/object#size",
      "keyword": "maxProperties",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/maxproperties",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "array",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/array#mincontains-maxcontains",
      "keyword": "minContains",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/mincontains",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "number",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/numeric#range",
      "keyword": "minimum",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/minimum",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "array",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/array#length",
      "keyword": "minItems",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/minitems",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "string",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/string#length",
      "keyword": "minLength",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/minlength/",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "object",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/object#size",
      "keyword": "minProperties",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/minproperties",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "number",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/numeric#multiples",
      "keyword": "multipleOf",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/multipleof",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "string",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/string#regexp",
      "keyword": "pattern",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/pattern",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "object",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/object#required",
      "keyword": "required",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/required",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "any",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/type",
      "keyword": "type",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/type",
      "vocabulary": "Validation"
    },
    {
      "applies_to": "array",
      "docs_url": "https://json-schema.org/understanding-json-schema/reference/array#uniqueItems",
      "keyword": "uniqueItems",
      "learn_url": "https://www.learnjsonschema.com/2020-12/validation/uniqueitems",
      "vocabulary": "Validation"
    }
  ],
  "summary": "20 keywords in the Validation vocabulary of Draft 2020-12: const, dependentRequired, enum, exclusiveMaximum, exclusiveMinimum, maxContains, maximum, maxItems, maxLength, maxProperties, minContains, minimum, minItems, minLength, minProperties, multipleOf, pattern, required, type, uniqueItems."
}
```

### Look up a keyword

Look up a JSON Schema keyword in json-schema.org's Understanding JSON Schema reference: what it does, its examples of valid and invalid values, its notes on older drafts, which dialects have it, and links to the reference, Learn JSON Schema and the specification. No API key required.

**Inputs**

- Keyword (`keyword`, text, required): The keyword to look up, such as minLength, required, unevaluatedProperties or $ref. The $ can be left off, and older names such as definitions lead to the keyword that replaced them.

**Outputs**

- `applies_to` (text): What it constrains: 'string', 'number', 'object', 'array' or 'any' value.
- `dialects` (list): The dialects that have it, newest first.
- `docs_url` (text): The section on json-schema.org.
- `examples` (list): The section's examples for the current dialect: a schema, and values checked against it.
- `explanation` (text): The section's explanation, as plain text.
- `keyword` (text): The keyword, as the reference names it today. For an older name, such as definitions, the keyword that replaced it, such as $defs.
- `learn_url` (text): The keyword's page on Learn JSON Schema, or null.
- `note` (text): For an older keyword, what became of it; otherwise null.
- `notes` (list): What the section says about other drafts.
- `section` (text): The reference section that explains it, e.g. 'Length'.
- `spec_url` (text): Its section of the Draft 2020-12 specification, or null.
- `summary` (text): What happened, in a sentence or two.
- `vocabulary` (text): The Draft 2020-12 vocabulary that defines it, e.g. 'Validation'.

**Example output**

```json
{
  "applies_to": "string",
  "dialects": [
    "Draft 2020-12",
    "Draft 2019-09",
    "Draft 7",
    "Draft 6",
    "Draft 4",
    "Draft 3"
  ],
  "docs_url": "https://json-schema.org/understanding-json-schema/reference/string#length",
  "examples": [
    {
      "schema": {
        "maxLength": 3,
        "minLength": 2,
        "type": "string"
      },
      "values": [
        {
          "caption": null,
          "valid": false,
          "value": "A"
        },
        {
          "caption": null,
          "valid": true,
          "value": "AB"
        },
        {
          "caption": null,
          "valid": true,
          "value": "ABC"
        },
        {
          "caption": null,
          "valid": false,
          "value": "ABCD"
        }
      ]
    }
  ],
  "explanation": "The length of a string can be constrained using the `minLength` and `maxLength` keywords. For both keywords, the value must be a non-negative number.",
  "keyword": "minLength",
  "learn_url": "https://www.learnjsonschema.com/2020-12/validation/minlength/",
  "note": null,
  "notes": [],
  "section": "Length",
  "spec_url": "https://json-schema.org/draft/2020-12/json-schema-validation#name-minlength",
  "summary": "minLength applies to a string, in the Validation vocabulary (Draft 2020-12, Draft 2019-09, Draft 7, Draft 6, Draft 4, Draft 3). The length of a string can be constrained using the `minLength` and `maxLength` keywords. For both keywords, the value must be a non-negative number.",
  "vocabulary": "Validation"
}
```

### Validate data against a schema

Check data against a JSON Schema and get whether it is valid, with every error: where in the data it is, which keyword it broke and why, in plain words. The schema can be an object, JSON text, a file or a link, in any dialect from Draft 3 to Draft 2020-12, and formats such as email and date-time are really checked. No API key required.

**Inputs**

- Schema (`schema`, text, required): The JSON Schema: an object from an earlier step, JSON text, an uploaded .json file, or the web address of one, such as https://json.schemastore.org/package.json. Its $ref links to other schemas on the web are followed.
- Data (`data`, text, required): The data to check, usually from an earlier step: an object, a list, text, a number, true, false or null. Text holding a JSON object or list is read as JSON (see Read JSON text as JSON), and an uploaded .json file works too.
- Dialect (`dialect`, text): Which version of JSON Schema to read the schema as. Leave it on the schema's own to follow its $schema, which is Draft 2020-12 when it has none; choose a draft to read it that way whatever it declares. One of: `auto` (The schema's own $schema (Draft 2020-12 if none)), `2020-12` (Draft 2020-12), `2019-09` (Draft 2019-09), `draft-07` (Draft 7), `draft-06` (Draft 6), `draft-04` (Draft 4), `draft-03` (Draft 3). Default: `auto`.
- Check formats (`check_formats`, true/false): Whether a value must really be what its format says: an email address, a date-time, a URI, a UUID and the rest. On by default. JSON Schema itself treats format as a label unless a validator is told to check it; turn this off to do the same. Default: `true`.
- Read JSON text as JSON (`read_json_text`, true/false): When the data is text holding a JSON object or list, such as a pasted document or a response kept as text, read it as JSON first. On by default. Turn it off to check such text as a string. Default: `true`.
- Most errors to list (`max_errors`, number): How many errors to list, from 1 to 1,000; 100 by default. All of them are counted either way. From 1 to 1000. Default: `100`.

**Outputs**

- `dialect` (text): The $schema URI of the dialect the schema was read as, e.g. 'https://json-schema.org/draft/2020-12/schema'.
- `dialect_name` (text): That dialect's name, e.g. 'Draft 2020-12'.
- `dialect_note` (text): Why the schema was read as a dialect other than the one it declares, such as a $schema this step does not know. Null when it was read as declared.
- `error_count` (number): How many errors the data has, however many are listed.
- `errors` (list): The errors, in the order the schema's keywords run, up to the most asked for.
- `summary` (text): What happened, in a sentence or two.
- `valid` (true/false): True when the data matches the schema.

**Example output**

```json
{
  "dialect": "https://json-schema.org/draft/2020-12/schema",
  "dialect_name": "Draft 2020-12",
  "dialect_note": null,
  "error_count": 3,
  "errors": [
    {
      "instance_location": "/email",
      "keyword": "format",
      "keyword_location": "/properties/email/format",
      "message": "\"ada.example.com\" is not a valid email."
    },
    {
      "instance_location": "/total",
      "keyword": "multipleOf",
      "keyword_location": "/properties/total/multipleOf",
      "message": "19.999 is not a multiple of 0.01."
    },
    {
      "instance_location": "/items",
      "keyword": "minItems",
      "keyword_location": "/properties/items/minItems",
      "message": "The list has 0 items, fewer than the minimum of 1."
    }
  ],
  "summary": "Not valid: 3 errors against the schema (Draft 2020-12). At /email: \"ada.example.com\" is not a valid email. At /total: 19.999 is not a multiple of 0.01. At /items: The list has 0 items, fewer than the minimum of 1.",
  "valid": false
}
```

### Validate each item in a list

Check each item of a list against a JSON Schema and split the list in two: the items that match, ready for the next step, and those that do not, each with its position and its errors. Up to 50,000 items. No API key required.

**Inputs**

- Schema (`schema`, text, required): The JSON Schema: an object from an earlier step, JSON text, an uploaded .json file, or the web address of one, such as https://json.schemastore.org/package.json. Its $ref links to other schemas on the web are followed.
- Items (`items`, text, required): The list to check item by item: a list from an earlier step, such as the rows of a sheet or the records an API returned, JSON text holding one, or an uploaded .json file of one. Up to 50,000 items.
- Dialect (`dialect`, text): Which version of JSON Schema to read the schema as. Leave it on the schema's own to follow its $schema, which is Draft 2020-12 when it has none; choose a draft to read it that way whatever it declares. One of: `auto` (The schema's own $schema (Draft 2020-12 if none)), `2020-12` (Draft 2020-12), `2019-09` (Draft 2019-09), `draft-07` (Draft 7), `draft-06` (Draft 6), `draft-04` (Draft 4), `draft-03` (Draft 3). Default: `auto`.
- Check formats (`check_formats`, true/false): Whether a value must really be what its format says: an email address, a date-time, a URI, a UUID and the rest. On by default. JSON Schema itself treats format as a label unless a validator is told to check it; turn this off to do the same. Default: `true`.
- Read JSON text as JSON (`read_json_text`, true/false): When the data is text holding a JSON object or list, such as a pasted document or a response kept as text, read it as JSON first. On by default. Turn it off to check such text as a string. Default: `true`.
- Most errors per item (`max_errors`, number): How many errors to list for each item that does not match, from 1 to 100; 10 by default. All of them are counted either way. From 1 to 100. Default: `10`.

**Outputs**

- `dialect` (text): The $schema URI of the dialect the schema was read as, e.g. 'https://json-schema.org/draft/2020-12/schema'.
- `dialect_name` (text): That dialect's name, e.g. 'Draft 2020-12'.
- `dialect_note` (text): Why the schema was read as a dialect other than the one it declares, such as a $schema this step does not know. Null when it was read as declared.
- `invalid_count` (number): How many items do not.
- `invalid_items` (list): The items that do not match, in order.
- `item_count` (number): How many items the list has.
- `summary` (text): What happened, in a sentence or two.
- `valid` (true/false): True when every item matches the schema.
- `valid_count` (number): How many items match.
- `valid_items` (list): The items that match, in order, as given.

**Example output**

```json
{
  "dialect": "https://json-schema.org/draft/2020-12/schema",
  "dialect_name": "Draft 2020-12",
  "dialect_note": null,
  "invalid_count": 1,
  "invalid_items": [
    {
      "error_count": 2,
      "errors": [
        {
          "instance_location": "/sku",
          "keyword": "pattern",
          "keyword_location": "/properties/sku/pattern",
          "message": "\"abc-1\" does not match the pattern \"^[A-Z]{3}-[0-9]{3}$\"."
        },
        {
          "instance_location": "/qty",
          "keyword": "minimum",
          "keyword_location": "/properties/qty/minimum",
          "message": "0 is less than the minimum of 1."
        }
      ],
      "index": 1,
      "item": {
        "qty": 0,
        "sku": "abc-1"
      }
    }
  ],
  "item_count": 3,
  "summary": "2 items of 3 match the schema (Draft 2020-12) and 1 does not. The first that does not is item 1: At /sku: \"abc-1\" does not match the pattern \"^[A-Z]{3}-[0-9]{3}$\".",
  "valid": false,
  "valid_count": 2,
  "valid_items": [
    {
      "qty": 2,
      "sku": "ABC-123"
    },
    {
      "qty": 1,
      "sku": "XYZ-999"
    }
  ]
}
```
