Supported encoding formats

The following encoding formats are supported as per LWM2M specification:
  • TLV
  • JSON
  • Opaque
  • Text
  • CBOR
  • SenML CBOR
  • SenML JSON
Note: If LWM2M client supports the JSON data format for all objects, the client must inform the LWM2M server by including the content-type in the root path link using the ct= <link attribute>.

Following is an example:

</>;ct=110, </1/0>,</1/1>,</2/0>,</2/1>,</2/2>,</2/3>,</2/4>,</3/0>,</4/0>,</5>
Where, content type (ct) value 110 is the value assigned in the CoAP Content-Format Registry in SenML JSON format used by LWM2M.

For more information on CBOR and SenML formats, see CBOR Support and Sensor Measurements List (SenML) Support.