WoluTools

Developer tools · JSON Schema

Check a batch of JSON files against your schema's required fields and types

Add your schema as the first file, then the JSON, JSONL or ZIP files to check. Every document is marked passed or failed, and each error names the JSON path, the expected type and the type found.

Will your schema run? These keywords are checked

  • type
  • required
  • properties with only type inside

Labels such as $schema and title can stay. Other keywords, such as $ref, enum, pattern or nested properties, stop the job before it runs. A stopped job is not counted against your free jobs.

or drop them here

Schema first, then JSON, JSONL or ZIP · Up to 49 documents
Free account needed for your 3 free jobs a day

No file at hand? See the worked example

Pro: up to 200 jobs a day · €12.99/month or €89.99/yearCompare plans

Worked example · fictional data

One schema, three documents, two failures

schema.json · first file
{
  "type": "object",
  "required": ["id", "email", "active"],
  "properties": {
    "id": { "type": "integer" },
    "email": { "type": "string" },
    "active": { "type": "boolean" },
    "tags": { "type": "array" }
  }
}
users.jsonl · one document per line
{"id": 1, "email": "a@example.com", "active": true, "tags": []}
{"id": "2", "email": "b@example.com", "active": true}
{"id": 3, "active": "yes", "tags": null}

validation.csv · one row per document

  • users.jsonl#line-1passed
  • users.jsonl#line-2failed
    • $/idexpected integer, got string
  • users.jsonl#line-3failed
    • $/emailrequired property missing
    • $/activeexpected boolean, got string
    • $/tagsexpected array, got null

In the CSV, the errors of one document sit in a single cell, separated by semicolons. An integer also passes where number is declared.

Using a full schema? Check your files with a trimmed copy

A schema with $ref, enum or format stops this job. Save a second copy that keeps only the top-level structure, upload that one first, and you get a pass or fail for every document. Keep your full schema for your own validator.

customer.schema.json · stops the job at $/additionalProperties
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["id", "email", "address"],
  "additionalProperties": false,
  "properties": {
    "id": { "type": "integer", "minimum": 1 },
    "email": { "type": "string", "format": "email" },
    "status": { "enum": ["active", "paused"] },
    "address": { "$ref": "#/$defs/address" }
  },
  "$defs": {
    "address": { "type": "object", "required": ["city"] }
  }
}
customer.trimmed.json · runs
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["id", "email", "address"],
  "properties": {
    "id": { "type": "integer" },
    "email": { "type": "string" },
    "status": { "type": "string" },
    "address": { "type": "object" }
  }
}

Struck through removed · Underlined added in place of enum and $ref

  1. 1

    At the root, keep type, required and properties. Delete the rest, such as $defs, additionalProperties, allOf or if.

  2. 2

    Inside each property, keep only type. Delete format, minimum, pattern, items and nested properties.

  3. 3

    Where a property uses $ref or enum, write the plain type it stands for, for example {"type": "object"}.

  4. 4

    Upload the trimmed copy as the first file, then your documents.

The trimmed check still catches

  • A missing id, email or address
  • "id": "7" where an integer is expected
  • "address": "Main St 1" where an object is expected

It no longer catches

  • An email without a valid format
  • A status other than active or paused
  • An address without city, or extra fields

How a check runs

  1. 1

    Put the schema first

    The first JSON document in the job is the schema. Every document after it is checked against it.

  2. 2

    Add the documents

    Separate JSON files, a JSONL file with one document per line, or a ZIP of JSON and JSONL files. Up to 49 documents per job.

  3. 3

    Read and download

    Check the pass and fail counts in the preview, then download the result package. It is kept for 24 hours.

Which schema keywords work

What you download

What a pass does and does not mean

A pass means the document has the right root type, every required top-level field is present, and each declared top-level property has the declared type. Values inside nested objects and arrays are not looked at, so a document can pass here and still fail a validator that runs your complete schema.

Use it as a quick first check across many files, for example on an API export or a folder of fixtures, then run your full schema before you rely on the data. If any file is not valid JSON, the job stops with an error instead of returning a partial result.

Questions before you run it

Which parts of JSON Schema are actually checked?

The root type, the top-level required properties and the declared type of each top-level property: string, number, integer, boolean, object, array or null. Any other validation keyword, such as $ref, items, enum or pattern, stops the job before it runs, and the error names the path of that keyword. A stopped job is not counted against your free jobs.

My schema uses $ref, enum or pattern. Can I still use it?

Yes, with a trimmed copy. Keep type, required and properties at the root, keep only type inside each property, and write the plain type where a property uses $ref or enum. Upload that copy first. Your documents are then checked for missing top-level fields and wrong top-level types; formats, patterns, enums and nested rules are not checked.

Where does the schema go?

The first JSON document in the job is read as the schema, and every document after it is checked against it. If a data file ends up first, the job stops with an unsupported-keyword error. Failed jobs do not count against your free jobs.

What does it report when a field has the wrong type?

A failed row for that document with the JSON path, the expected type and the type found, for example $/id: expected integer, got string. A missing field reads $/email: required property missing.

Can I validate a whole folder or an NDJSON export?

Yes. Upload a ZIP of JSON files, or a JSONL file where each line is one document, up to 49 documents per run. JSONL rows are named by line, for example users.jsonl#line-3.

What happens if one file in the batch is malformed JSON?

The job stops with an error instead of returning a partial result. Fix the file and run it again. Failed jobs are not counted.

Does a pass here mean my payload is valid against my full schema?

No. Only the root type, top-level required fields and top-level types were checked. Nested rules, references and formats need a validator that runs your complete schema.

Do I need an account?

Yes, a free account. It includes 3 free jobs a day. Pro allows up to 200 jobs a day for €12.99 a month or €89.99 a year.