Closed
Description
As per the RFC-7049, it is possible to use the Major Type 7 (0b111) to pass values with no content :
https://tools.ietf.org/html/rfc7049#section-2.3
However, passing one of these value in a CBOR mapper ends with an exception. Here is a Kotlin sample to reproduce the exception :
fun main(args: Array<String>) {
val cborMapper = ObjectMapper(CBORFactory())
cborMapper.readValue(byteArrayOf(0b1110, 0b0001), object : TypeReference<Any>() {})
}
This throws the following exception :
Exception in thread "main" com.fasterxml.jackson.core.JsonParseException: Invalid CBOR value token (first byte): 0xe1
It should be possible to use these kinds of values, is there a possibility to solve this problem ?
Thanks