A JSON body is encoded as defined for the JSON message mapping defined in 7.2.4.6.9.
When sending a MQTT Version 5.0 message the MQTT ContentType property shall be set to application/json when sending uncompressed JSON messages.
JSON messages can become quite large. In order to save bandwidth and to reduce message size, on MQTT Version 5.0 the MQTT Content Type property allows to select a compression type as encoding for a JSON message.
When sending a gzip (RFC 1952) compressed JSON message on MQTT Version 5.0 the MQTT ContentType property shall be set to application/json+gzip. If a Subscriber receives messages without MQTT ContentType from MQTT Version 3.1.1 Publishers it may require manual configuration.
A UADP body is encoded as defined for the UADP message mapping defined in 7.2.3.
It is expected that the software used to receive UADP NetworkMessage can process the body without needing to know how it was transported.
If the encoded MQTT message size exceeds the Broker limits, it is broken into multiple chunks as described in 7.2.4.4.4.
When sending such message over MQTT Version 5.0 the ContentType property shall be set to application/opcua+uadp.