Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to decode CBOR's undefined to null #45

Merged
merged 2 commits into from
Nov 20, 2018
Merged

option to decode CBOR's undefined to null #45

merged 2 commits into from
Nov 20, 2018

Commits on Nov 14, 2018

  1. decode CBOR's undefined to null

    Bleh. We're not going to round-trip this but we shouldn't hit this anyways.
    
    Alternatively, we could just return an error. However, that may break things for
    some users...
    
    fixes #43
    Stebalien committed Nov 14, 2018
    Configuration menu
    Copy the full SHA
    ede3ae2 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2018

  1. cbor: introduce CoerceUndefToNull decode option.

    By default we will raise an error if we encounter the cbor "undefined"
    byte, because it's a long way from a canonical object if it has one of
    these bytes in it, and I think we should not be silent about that.
    If you want to coerce it to null: that's also an option!
    
    Diff is a bit larger than one might expect it should be because this
    turns out to be the first decoding option we've actually passed
    through all the way to the decoder.
    
    Signed-off-by: Eric Myhre <hash@exultant.us>
    warpfork committed Nov 20, 2018
    Configuration menu
    Copy the full SHA
    bbf0067 View commit details
    Browse the repository at this point in the history