Skip to content
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

How about CBOR RFC(7049->8949) #279

Open
Anton-Latukha opened this issue Feb 8, 2022 · 3 comments
Open

How about CBOR RFC(7049->8949) #279

Anton-Latukha opened this issue Feb 8, 2022 · 3 comments

Comments

@Anton-Latukha
Copy link
Contributor

Screenshot-2022-02-08-18:45:45

While, RFC8948 is also equally named Concise Binary Object Representation (CBOR) & published on December 2020.

It has a section on changes from the previous RFC: https://datatracker.ietf.org/doc/html/rfc8949#appendix-G

It is probably logical to start thinking to provide support for the new CBOR RFC also in the scope of the cbor.

@Anton-Latukha
Copy link
Contributor Author

Since:

As discussed in the introduction, this document formally obsoletes
RFC 7049 while keeping full compatibility with the interchange format
from RFC 7049. This document provides editorial improvements, added
detail, and fixed errata. This document does not create a new
version of the format.

It may be as simple, as claiming the new RFC support also.

@bgamari
Copy link
Member

bgamari commented Mar 6, 2023

I have read Appendix G and as far as I can tell there are very few changes that would affect the codec implementation. The one thing I am a bit uncertain of is whether the Canonical CBOR implementation is consistent with the new Section 4.2. @dcoutts could speak to this.

@dcoutts
Copy link
Member

dcoutts commented Mar 7, 2023

Looks like I'll have to read the new RFC then :-)

I should note that supporting canonical CBOR (as the original RFC calls it) is not automagic using the cborg library. It requires the library user to write their decoder in particular ways, and not just using the right primitives.

Also, the library has never had support for the bonkers recommendation in the RFC for the sort order of keys in maps/sets: it recommends using the order of the CBOR encoding of the key, rather than the logical sort order of the key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants