
k is "maxItems": n and J is an array with at most n elements.k is "minItems": n and J is an array with at least n elements.k is "additionalItems": S', A has a pair of form "items":, and J is an array such that each a i, for i > n, validates against S'.k is "additionalItems": S' and A contains a pair of the form "items": S' (that is, the value of items is an object, not an array).k is "additionalItems": S', A does not contain a pair with keyword "items" and J is an array such that every element validates against S'.k is "additionalItems": false, and either A does not contain a pair with keyword "items", or such pair is of the form "items": S' (that is, the value of items is an object, not an array).k is "additionalItems": false, there is a key:value pair "items": in A and J is an array with at most n elements.k is "additionalItems": true and J is an array.
k is "items": and J is an array such that every element a i validates against s i with i ≤ Min(m,n). k is "items": S' and J is an array such that every element validates against S'. We say that J validates against A if for each key:value pair k in A one of the following holds: Let A be an Array Schema and J a JSON document. Here n is a natural number and bool is either true or false. Minitems := "minItems": n maxitems := "maxItems": n unique := "uniqueItems": bool In this section we specify array's main charasteristics and restrictions that may apply to them using a single JSON Schema document.įirst of all, we want to ensure that the document we are validating is an array using the type restriction. JSON can store nested objects and arrays as values assigned to keys. Each object is a record of a person (with name, gender, and age). Array SchemasĪrrays are used to represent ordered sets of values, such as the following sequence of strings: In the above JSON array, there are three objects. Baseelements json array how to#
Here we show how to specify collections of JSON types using possibly nested JSON Schemas.