JSON Schema Tour

Welcome to the JSON Schema Tour! In this interactive tour you will be introduced to JSON Schema. You will learn how to use JSON Schema draft 2020-12 to validate JSON documents.

Are there any prerequisites?

No! You just need to know what JSON is.

What is JSON Schema?

JSON Schema is a language used for defining the structure and constraints of a JSON document. A JSON Schema is a JSON document that you can use to validate or document another JSON, which we call a JSON instance.

First Schema

Let's start with a simple example. Consider you have a JSON document of an employee:

1{
2  "name": "John Doe",
3  "age": 25
4}

This JSON document has two properties:

  • name with value John Doe (string)
  • age with value 25 (integer)

Complete the schema on the right side!

Define the age property and constrain its type to be integer!

Loading...
Output
Please click the button or use
Shift+Enter
to view the output