Errata exists for this version of the document.

ExpandedNodeId values shall be encoded as a JSON object with the fields defined in Table 24.

The abstract ExpandedNodeId structure is defined in OPC 10000-3 and has five fields Identifier, IdentifierType, NamespaceIndex, NamespaceUri and ServerIndex. The representation of these abstract fields are described in the table.

Table 24 – JSON Object Definition for an ExpandedNodeId

Name

Description

IdType

The IdentifierType encoded as a JSON number.

Allowed values are:

0 - UInt32 Identifier encoded as a JSON number.

1 - A String Identifier encoded as a JSON string.

2 - A Guid Identifier encoded as described in 5.4.2.7.

3 - A ByteString Identifier encoded as described in 5.4.2.8.

This field is omitted for UInt32 identifiers.

Id

The Identifier.

The value of the ‘t’ field specifies the encoding of this field.

Namespace

The NamespaceIndex or the NamespaceUri for the ExpandedNodeId.

If the NamespaceUri is not specified, the NamespaceIndex is encoded with these rules:

The field is encoded as a JSON number for the reversible encoding.

The field is omitted if the NamespaceIndex equals 0.

For the non-reversible encoding the field is the NamespaceUri associated with the NamespaceIndex encoded as a JSON string.

A NamespaceIndex of 1 is always encoded as a JSON number.

If the NamespaceUri is specified it is encoded as a JSON string in this field.

ServerUri

The ServerIndex for the ExpandedNodeId.

This field is encoded as a JSON number for the reversible encoding.

This field is omitted if the ServerIndex equals 0.

For the non-reversible encoding, this field is the ServerUri associated with the ServerIndex portion of the ExpandedNodeId, encoded as a JSON string.