Skip to content

decodeJson

Canonical path: o6.decodeJson

decodeJson

decodeJson(data, dataType)

Decode a JSON-encoded OPC UA value.

Parameters:

Name Type Description Default
data bytes

The OPC UA JSON representation to read.

required
dataType type[_NativeT]

The expected type.

required

Returns:

Type Description
_NativeT

The decoded value of type dataType.

Raises:

Type Description
StatusCodeError

data is not a valid encoding of dataType.