Objects

Objects can contain any properties. A property is described under Properties and can be refined through optional metadata (propertiesMeta).

The following JSON schema describes an object with two properties.

{
   "$schema": "http://json-schema.org/draft-04/schema",
   "definitions": {
      "CustomDatatype": {
         "$schema": "http://json-schema.org/draft-04/schema",
         "title": "CustomDatatype",
         "type": "object",
         "propertiesMeta": [
            {
               "name": "axisName",
               "category": "Name",
               "displayName": "Axis Name",
               "displayPriority": 10,
               "description": "",
               "defaultValue": null,
               "defaultValueInternal": null
            },
            {
               "name": "axisColor",
               "category": "Colors",
               "displayName": "Axis color",
               "displayPriority": 10,
               "description": "",
               "defaultValue": null,
               "defaultValueInternal": {
                  "color": "#4794da"
               }
            }
         ],
         "properties": {
            "axisName": {
               "type": "string"
            },
            "axisColor": {
               "$ref": "tchmi:framework#/definitions/SolidColor"
            }
         },
         "required": [ "axisName" ]
      }
   }
}

This results in the following generic data editor in Engineering.

Objects 1:

Explanations

propertiesMeta:

The metadata of the properties are optional. They describe the display within the generic data editor. The metadata are described by the following properties:

properties:

The name and data type of the object properties are described under Properties. The name is determined by the name of the property. The data type can be described as follows:

required:

The required properties are listed under "required". The list is based on the internal name. If a property of the object that is set to required is not set in Engineering, the generic data editor displays a warning.