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

Add decode option to allow rejecting inputs that contain certain simple values. #481

Merged
merged 1 commit into from
Apr 7, 2024

Commits on Apr 2, 2024

  1. Add option to configure how simple values are decoded.

    Applications can use the decode option SimpleValues to override the default unmarshal behavior on a
    per-simple-value basis. The option is open to future extension, and currently supports the choice
    between the default backwards-compatible behavior (true as true, false as false, null as nil, and
    undefined as nil, and cbor.SimpleValue(N) for each currently-unregistered but well-formed simple
    value number N) and outright rejection with the new error type UnacceptableDataItemError.
    
    Signed-off-by: Ben Luddy <[email protected]>
    benluddy committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    28078a7 View commit details
    Browse the repository at this point in the history