-
Notifications
You must be signed in to change notification settings - Fork 93
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
CBOR Research #342
Comments
There are extensible "tags", which might not map: https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml |
A CBOR implementation is not expected to know all semantic tags (and generally cannot, since new semantic tags can be added at any time). It is perfectly valid to ignore all semantic tags completely, and this is explicitly stated in the CBOR spec. Section 2.4, paragraph 3: "Understanding the semantic tags is optional for a decoder; it can just jump over the initial bytes of the tag and interpret the tagged data item itself." This seems like the best approach for Boost.JSON, since none of the types used by JSON require semantic tags. |
|
Well Peter did this |
Sorry for the late comment. There are a number of CBOR tags where it's impossible to reconstitute the value without knowing the tag. For example, tags 2 (unsigned bignum) and 3 (negative bignum). I've pointed out this flaw years ago on the CBOR mailing list, yet new tags keep popping up where part of the information (beyond semantics) is encoded in the tag. They are too obsessed over saving every possible byte, and don't seem care about being able to transcode to JSON without losing unrecoverable information. |
We need preliminary research into CBOR. Is the mapping to and from a
json::value
clean? Are there any obstacles to implementing a parser and serializer for CBOR? This is research-only, no implementation.The text was updated successfully, but these errors were encountered: