WebWeWant / webwewant.fyi

If you build websites, you inevitably run into problems. Maybe there’s no way to achieve an aspect of your design using CSS. Or maybe there’s a device feature you really wish you could tap into using JavaScript. Or perhaps the in-browser DevTools don’t give you a key insight you need to do your job. We want to hear about it!
https://webwewant.fyi
MIT License
76 stars 23 forks source link

Native CBOR Support #290

Open WebWeWantBot opened 3 years ago

WebWeWantBot commented 3 years ago

title: Native CBOR Support date: 2021-02-18T18:11:14.044Z submitter: Brad Isbell number: 602eadc2a6174300d5585008 tags: [ ] discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/ status: [ discussing || in-progress || complete ] related:

CBOR is a standardized binary structured data format, akin to JSON, with additional benefits:

CBOR was first published in RFC7049 in 2013. Some editorial improvements have been made, with the current standard published at RFC8949

The format is well supported, with implementations in most all commonly used languages: http://cbor.io/impls.html

Use cases include:

Currently, we can work around the problem by loading a CBOR JavaScript library to encode/decode. However, I believe a native implementation would have performance improvements. At a minimum, we wouldn't need to load a library.

I propose that a standard CBOR encoder/decoder be implemented, with support for all of the datatypes supported by JavaScript.

The ubiquitous availability of JSON is what made JSON a popular choice. CBOR's benefits make it better choice for most applications. If CBOR were natively available, I have no doubt that it would be used much more broadly.


If posted, this will appear at https://webwewant.fyi/wants/602eadc2a6174300d5585008/

aarongustafson commented 3 years ago

@cwilso @tantek @captainbrosset @bkardell This is outside my wheelhouse. Do any of you have familiarity with CBOR and/or have thoughts?

captainbrosset commented 3 years ago

I don't know much about this either, only that browsers already encode/decode CBOR for different internal use case (it looks like Gecko uses it for WebAuthn).

bradisbell commented 1 year ago

^G Any feedback or additional thoughts on this?