-
-
Notifications
You must be signed in to change notification settings - Fork 141
Add support for decoding unassigned "simple values" (type 7) #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for reporting this: I'll take a look soon to see what is going on. One quick question: is the |
Hello, Thank you for your prompt answer. You're completely right, I should have written I started to write some code but it doesn't work as expected. I wanted to change how the CBORParser class handles tokens of Major Type 7 but didn't manage to output the right values. |
@davidlepilote Ok. Looks like there are undefined "simple values", meaning of which is specified somewhere else. Decoding part would not be too hard, but runs into one very specific conceptual problem -- how should these be exposed as I guess the obvious answer would be But one thing that I do not quite understand is this: I do not see any definitions for simple values beyond standard-specified ones, on: https://en.wikipedia.org/wiki/CBOR#Simple_value (in contrast to type tags, for which registrations exist) So... is there some specific use case in existence? |
Planning to add rudimentary support for 2.12, in which valid "simple values" are exposed as |
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 :
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
The text was updated successfully, but these errors were encountered: