Dev Tools icon

Dev Tools

A suite of utility tools for developers: Generators, converters, and transformers.

JSON Schema Validator

AI-generated

Summary

Validate a JSON data string or object against a JSON Schema string or object and return whether the data conforms to the schema, including any validation errors.

Inputs

  • Data (JSON) (required) — The JSON data to validate, provided as a JSON string.
  • Schema (JSON) (required) — The JSON Schema to validate against, provided as a JSON string.

Output shape

a single JSON object per input item

The output contains 'isValid' boolean indicating validation success and 'errors' array listing any validation errors. If the input data or schema is invalid JSON, the node throws an error.

Examples

Example 1: Validate JSON data with a schema

Provide the JSON data and the corresponding JSON Schema in string form in the respective input fields. The node returns isValid:true if data matches the schema or isValid:false along with an array of errors if validation fails.

Links

Discussion