OPC Foundation
  • Documents
  • NodeSets
  • Search
5.4.2.16 ExtensionObject

The ExtensionObject is encoded as a JSON object as described in:

  • Structure (see 5.4.6);
  • Structure with optional fields (see 5.4.7);
  • Union (see 5.4.8);

with the UaTypeId field inserted into the JSON object.

Decoders shall report decoding errors to the application if a JSON object has multiple fields with the same name.

The UaEncoding and UaBody fields are only used when UA Binary or UA XML encoded Structures are serialized. Only the fields in Table 40 are present if these fields are used.

The JSON object fields used for an ExtensionObject are in Table 40.

Table 40 – JSON Object Fields used for an ExtensionObject

Name

Description

UaTypeId

A NodeId formatted using the rules in 5.4.2.10.

This is the NodeId of a DataType Node.

UaEncoding

A JSON number that represents the format of the UaBody field.

A value of 1 indicates UA Binary data is encoded in the UaBody field.

A value of 2 indicates UA XML data is encoded in the UaBody field.

This field is omitted for JSON encoded Structures.

UaBody

A ByteString containing an UA Binary or UA XML encoded Structure.

This field is omitted for JSON encoded Structures.

Encoders, when allowed by the DevelopmentPlatform, should write the UaTypeId first. Decoders shall accept the UaTypeId in any position.

The default value for an ExtensionObject is serialized as an empty JSON object in the VerboseEncoding and omitted in the CompactEncoding.

Please report errors or issues with the site to webmaster.

Copyright © 2026 - OPC Foundation