ExpandedNodeId values shall be encoded as a JSON object with the fields defined in Table H.2.
Decoders that support the deprecated encodings use the JSON datatype to detect which encoding is used. A JSON string is the current encoding; a JSON object means it is the deprecated encoding.
Table H.2 – 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 IdType field specifies the encoding of this field. |
Namespace |
For ReversibleEncoding this field is a JSON string with the NamespaceUri if the NamespaceUri is specified. Otherwise, it is a JSON number with the NamespaceIndex. The field is omitted if the NamespaceIndex is 0. For NonReversibleEncoding this field is the JSON string containing the NamespaceUri or the NamespaceUri associated with the NamespaceIndex unless the NamespaceIndex is 0 or 1. If the NamespaceIndex is 0 the field is omitted. |
ServerUri |
For ReversibleEncoding this field is a JSON number with the ServerIndex. The field is omitted if the ServerIndex is 0. For NonReversibleEncoding this field is the JSON string containing the ServerUri associated with the ServerIndex unless the ServerIndex is 0. If the ServerIndex is 0 the field is omitted. |