mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
614 stars 69 forks source link

Request for Mozilla Position on CBOR #603

Closed rmedaer closed 2 years ago

rmedaer commented 2 years ago

Request for Mozilla Position on an Emerging Web Specification

Other information

Similar to JSON library, would it be possible to implement both CBOR.encode and CBOR.decode ?


Edit: RFC 7049 was deprecated, replacing by RFC 8949.

bortzmeyer commented 2 years ago

RFC 7049 was deprecated one year ago. The current standard of CBOR is RFC 8949.

rmedaer commented 2 years ago

My bad. I update the issue.

annevk commented 2 years ago

I'm not sure I understand the request. CBOR only makes sense for us to support as part of something else. Is there a concrete proposal for JS API somewhere that you want us to evaluate?

rmedaer commented 2 years ago

As far as I know, there is currently not any standardized JS API specification for CBOR encoding/decoding. However @cabo says on his website:

Many implementations use a simple API of the form: encoded = CBOR.encode(data)data = CBOR.decode(encoded)

cabo commented 2 years ago

There is more than one "something else", so it would be useful to have a common way to operate on CBOR encoded data. The very simple interface described here is fine if the platform can map the CBOR generic data model (including, e.g., tags); it is probably worth to describe how that is done in general. You probably also want to provide a similar interface for RFC8742 CBOR Sequences.

annevk commented 2 years ago

To be clear, this is a place to ask Mozilla for its position on a standard or proposal, not to create a proposal. For that you want https://wicg.io/ or equivalent. I suggest we mark this as defer.

ekr commented 2 years ago

defer seems fine.

I suppose we could offer an opinion on CBOR per se, but that seems kind of redundant given that it's widely deployed.

martinthomson commented 2 years ago

To be clear, we ship it already in Firefox. It's part of WebAuthn. So this is somewhat moot.

rmedaer commented 2 years ago

Many thanks for your feedback. As you can see in the history of this issue, I submitted a proposal through the WICG/proposals repository.