An online, interactive JSON Schema validator. Supports JSON Schema Draft 3, Draft 4, Draft 6, Draft 7, Draft 2019-09 and Draft 2020-12.
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "Chinook customer model.",
"type": "object",
"x-examples": {
"example-1": {
"data": {
"type": "customers",
"id": "1",
"attributes": {
"firstName": "Luís",
"lastName": "Gonçalves",
"company": "Embraer - Empresa Brasileira de Aeronáutica S.A.",
"address": "Av. Brigadeiro Faria Lima, 2170",
"city": "São José dos Campos",
"state": "SP",
"country": "Brazil",
"postalCode": "12227-000",
"phone": "+55 (12) 3923-5555",
"fax": "+55 (12) 3923-5566",
"email": "luisg@embraer.com.br"
}
}
}
},
"properties": {
"data": {
"type": "object",
"required": [
"type",
"attributes"
],
"properties": {
"type": {
"type": "string",
"minLength": 1
},
"attributes": {
"type": "object",
"required": [
"firstName",
"lastName",
"email"
],
"properties": {
"firstName": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"lastName": {
"type": "string",
"minLength": 1,
"maxLength": 20
},
"company": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 70
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"state": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"country": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"postalCode": {
"type": "string",
"minLength": 1,
"maxLength": 10
},
"phone": {
"type": "string",
"minLength": 1,
"maxLength": 24
},
"fax": {
"type": "string",
"minLength": 1,
"maxLength": 24
},
"email": {
"type": "string",
"minLength": 1,
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",
"maxLength": 60,
"format": "email",
"example": "yunier@hey.com"
}
}
}
},
"additionalProperties": false
}
},
"required": [
"data"
]
}
{
"data": {
"type": "customers",
"id": "1",
"attributes": {
"firstName": "Luís",
"lastName": "Gonçalves",
"company": "Embraer - Empresa Brasileira de Aeronáutica S.A.",
"address": "Av. Brigadeiro Faria Lima, 2170",
"city": "São José dos Campos",
"state": "SP",
"country": "Brazil",
"postalCode": "12227-000",
"phone": "+55 (12) 3923-5555",
"fax": "+55 (12) 3923-5566",
"email": "luisg@embraer.com.br"
}
}
}