-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
2 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters