ipld / specs

Content-addressed, authenticated, immutable data structures
Other
592 stars 108 forks source link

dag-cbor: more strictness items and additional clarifications #310

Closed rvagg closed 3 years ago

rvagg commented 3 years ago

Some additional items that have occurred to me during my weekend cbor hacking. Some of these changes don't add rules, it's just further clarity.

> dagCbor.util.deserialize(dagCbor.util.serialize([1,,,,3]))
[ 1, undefined, undefined, undefined, 3 ]

(JSON does the right thing here in JS btw and coerces them to null but coercion is probably the wrong thing to be doing there!).