Closed Stebalien closed 5 years ago
Looks like this is the undefined type. According to the spec, it looks like that should be used to indicate encoding errors... WHY? :sob:
It looks like we're not the first to trip over this: https://github.com/FasterXML/jackson-dataformats-binary/issues/93
I'm going to suggest the same solution: silently coerce to null (maybe we should make that optional)?
cbor.DecodeOptions{CoerceUndefToNull:true}
is now supported :tada:
Specifically (base64 encoded):
This should decode to (python syntax):
Error:
Test case:
On go-ipfs 0.4.18, run:
ipfs dag get zdpuArHM9moUGtzo47sHeQ5qS4jiuQApyMnFFLoBDdYeouwHy
Downstream bug https://github.com/ipfs/go-ipfs/issues/5776.