The UA JSON DataEncoding defined in 5.4 specifies how OPC UA DataTypes are serialized in JSON. This Annex specifies how to describe the DataEncoding using a machine-readable schema syntax. Unlike, XML there is no universally accepted JSON schema syntax. This Annex defines mappings to two of the most widely used: JSON Schema and OpenAPI.
Clause G.2 defines the JSON Schema for all DataTypes defined in the OPC UA namespace.
The JSON Schema for the CompactEncoding for all DataTypes released with this version of this document can be found here:
NOTE The latest file that is compatible with this version of this document can be found here:
The JSON Schema for the CompactEncoding for all DataTypes, excluding DataTypes used for only for Services, released with this version of this document can be found here:
NOTE The latest file that is compatible with this version of this document can be found here:
The JSON Schema for the VerboseEncoding for all DataTypes, excluding DataTypes used for only for Services, released with this version of this document can be found here:
NOTE The latest file that is compatible with this version of this document can be found here:
The OpenAPI mapping defines path for each Service. The Request and Response messages have a structure generated from the Service definitions in OPC 10000-4. The types for the payload of the HTTP message have the name ‘Request’ and ‘Response’ with the Service name as a prefix (i.e. ReadRequest and ReadResponse).
The OpenAPI schema is intended for use with HTTPS, however, the schema definitions are useful in other contexts, such as when using WebSockets or MQTT. When a Service message is sent via protocols other than HTTPS, the messages are wrapped in an envelope that defines the information sent in the HTTPS headers. The envelope is defined in Table G.1.
Table G.1 – OpenAPI Message Envelope
Name |
Type |
Description |
ServiceId |
NodeId |
The DataTypeId for the Body. |
LocaleIds [] |
LocaleId |
List of locale ids to use when creating a Response to a Request. Not specified for Response messages. |
Body |
* |
The Request or Response associated with the Service. The ServiceId indicates the content of the Body. |
The authorization header needs to be handled in a way specific to the transport (see 7.5 for WebSockets).
The OpenAPI schema for the subset of Services that support Session-less invocation released with this version of this document can be found here:
NOTE The latest file that is compatible with this version of this document can be found here:
The OpenAPI Schema for all Services released with this version of this document can be found here:
NOTE The latest file that is compatible with this version of this document can be found here: