Encoding and decoding uint8_t using
atpradeep opened this issue · 1 comments
atpradeep commented
I am using latest version and using "cbor_encode_simple_value()" for encoding "uint8_t".
But when I parse then it is returning blank value with "CborErrorIllegalSimpleType".
Also if I set encode value of uint8_t more than 20 then I get type at the time of parsing as "CborBooleanType" or CborNullType".
How to encode and parse uint8_t using TinyCbor.
thiagomacieira commented
Please refer to the CBOR specification. Simple types/values can be in the range 0 to 23 and 32 to 255 (inclusive). Values 24 to 31 are invalid. Use of values 0 to 23 requires a new IETF Standard to be published; the other ones only require a specification.
Value 20 is false
, 21 is true
, 22 is null
and 23 is undefined
.