On sexta-feira, 1 de abril de 2016 08:36:15 PDT ??? wrote:
> Hi all,
>
> We have issue to decode cbor encoded payload on cloud side which encoded by
> iotivity client. (we use FasterXML/jackson library 2.4.0(java) on cloud
> side, and also test under 2.7.0, latest version).
> If we encode uint8_t field using "cbor_encode_simple_value"
> and parse on cloud, that jackson library returns parse error like below.
> "com.fasterxml.jackson.databind.JsonMappingException: Invalid CBOR value
> token (first byte): 0xe1"
> But if we use "cbor_encode_uint" to encode uint8_t field, it is OK.
>
> Are there any guys have this kind of issues ?
You probably don't want to use "simple value". They are not integers, they are
types that don't carry payloads and can be represented by one byte.
The following simple values are defined:
20 false
21 true
22 null
23 undefined
In addition to that, values 25-31 are reserved and cannot be used.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center