OPC Foundation
  • Documents
  • NodeSets
  • Search
5.4.2.17 Variant

Variant values shall be encoded as a JSON object with the fields shown in Table 40.

Table 40 – JSON Object Definition for a Variant

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.

Please report errors or issues with the site to webmaster.

Copyright © 2025 - OPC Foundation