Liquid XML Studio 2019
Type
JSON Schema Editor > Properties > Type
Draft 04 Draft 06 Draft 07

Validation

 The value of this keyword MUST be either a string or an array. If it is an array, elements of the array MUST be strings and MUST be unique.

String values MUST be one of the seven primitive types defined by the core specification ("array", "boolean", "integer", "number", "null", "object", "string").

An instance matches successfully if its primitive type is one of the types defined by keyword. Recall: "number" includes "integer".

Graphical Representation

You can easily tell the type of a schema object as its displayed within the node as an icon, and as text (unless it is a reference to another type).

Icon Description
The data type is any, i.e. any one of the primitive types "array", "boolean", "integer", "number", "null", "object", "string".
The data type is an array.
The data type is a boolean (true/false).
The data type is an integer.
The data type is a null (the text null in the instance document).
The data type is a number (integer or real number).
The data type is an object.
The data type is a string.
The data type is union of 2 or more types.
The data type is unknown, it either contains an invalid value or can not be determined as the referenced type can not be resolved.

 

When the schema contains a reference, the reference id is shown not the type, but the icon still reflects the type. In this case a string.

When the type is changed any keywords that no longer apply are removed.

For example if a schema object is of type any and contains 'properties'. If the type is changed to string, then the 'properties' are automatically removed as the are not used for validating a string.

 

See Also