greglook / clj-cbor

Native Clojure CBOR codec implementation.
The Unlicense
70 stars 7 forks source link

Use registered 'set' tag from IANA #6

Closed greglook closed 6 years ago

greglook commented 6 years ago

The library currently uses tag code 13 to represent sets of unique elements, but this tag is not registered anywhere. Ideally, it should be added to the IANA registry in the two-byte tag range. This will unfortunately change the canonical serialization of any data using sets, but we can maintain backwards compatibility for some number of future library versions by reading in tag 13 objects as sets if no handler is registered.

greglook commented 6 years ago

Sets now have a registered tag (number 258) in the IANA registry, so we should use that: https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml https://github.com/input-output-hk/cbor-sets-spec/blob/master/CBOR_SETS.md

greglook commented 6 years ago

c185139655dacc24e59ffee27d2ef33d1922c152