Properties must be one of the following types. These are standard types defined in the JSON Schema specification:
|string||A string of text that may contain unicode characters|
|number||Any numeric type. It can be an integer or floating point number|
|integer||An integral number|
|boolean||A value that can be true or false|
|object||A JSON object. Can be defined inline or via a $ref to an internal or external type|
|array||A JSON array containing ordered elements. Typically used in nested content types to stored linked content items. See the Carousel sample for an example of its use.|
Note that the
null data type is not supported.
Each property can include a title and description.
The snippets below show examples of each property together with images to show how properties of this type appear in the content editing user interface.
String types are described in detail on the strings page.
In the example below, the bannerOpacity property is defined as a number. The minimum and maximum keywords are used as additional validation to ensure that the number entered is between 0 and 1.
Expand the images below to see the number property as it is displayed in the content editing form.
The integer type is an integral value. In the snippet below there is no maximum set, but it doesn't make any sense for a stock value to fall below 0.
The boolean type is a simple true or false. In the example below, the user will choose whether to select an option for the way a banner is displayed on mobile screen sizes.
The array property is often used to hold a list of external objects, such as in the carousel example where the slides property contains the carousel slide items. The maxItems validation keyword is used to set the maximum number of items, in this case carousel slides, that can be added to 6.
Arrays are also useful for simple types, such as shown in the following example: