The ExtensionObject is encoded as a JSON object as described in:
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 39 are present if these fields are used.
The JSON object fields used for an ExtensionObject are in Table 39.
Table 39 – 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.