5.4.2.17 Variant
Variant values shall be encoded as a JSON object with the fields shown in Table 41.
| Name | Description |
|---|---|
| UaType | The built-in type for the value contained in the Body (see Table 1) encoded as JSON number. |
| Value | If the value is a scalar, it is encoded using the rules for type specified for the Type. If the value is a one-dimensional array it is encoded as JSON array (see 5.4.5). Multi-dimensional arrays are encoded as a JSON array containing all elements. The mapping of a multidimensional array to a flat list is described in 5.2.2.16. The field is not encoded if the value is a NULL for nullable built-in types (see Table 1). |
| Dimensions | The dimensions of the array encoded as a JSON array of JSON numbers. |
Encoders, when allowed by the DevelopmentPlatform, should write the UaType first. Decoders shall accept the UaType field in any position.