cborg icon indicating copy to clipboard operation
cborg copied to clipboard

Adds support for ByteStrings in inside JSON

Open yaitskov opened this issue 3 years ago • 8 comments

I am implementing WebAuthn authentication. Chrome browser returns part of data encoded in CBOR and uses 58/59 bytes (fixed byte string with length up to 255/65535 bytes) to encode key.

I think exposing such type as a hex string in JSON is best option. Aeson.Array Number is much less efficient.

  • extra dependency on base16

yaitskov avatar Dec 18 '20 16:12 yaitskov

@phadej

yaitskov avatar Dec 18 '20 16:12 yaitskov

I don't understand why I'm pinged here.

phadej avatar Dec 18 '20 17:12 phadej

I was looking for reviewers and found you among previous ones.

yaitskov avatar Dec 18 '20 18:12 yaitskov

That's the way I ended up "maintaining" plenty of stuff :)

phadej avatar Dec 18 '20 18:12 phadej

CI is green except on gch 7.8.4 because store package dropped 7.8.4 support

9883f44 - Remove configuration for building with ghc-7.8 (4 months ago) (Michael Sloan)

yaitskov avatar Dec 18 '20 18:12 yaitskov

could store maintainers correct the metadata then: https://matrix.hackage.haskell.org/#/package/store, there shouldn't be red cells.

phadej avatar Dec 18 '20 18:12 phadej

Please, let's not workaround others' bugs (which are easily fixable). There is no hurry.

phadej avatar Dec 18 '20 19:12 phadej

PR CI is green, thanks to store team efforts. https://github.com/mgsloan/store/issues/157

yaitskov avatar Dec 21 '20 07:12 yaitskov