Skip to content

Add support for decoding registered CBOR tag to interface type #308

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

Merged

Conversation

fxamacker
Copy link
Owner

Description

Closes #301

Modify decoder to create new value of registered type and decode data to that value when unmarshaling CBOR data with registered tag to interface type.

Modify decoder to create new value of registered type and decode data
to that value when unmarshaling CBOR data with registered tag to
interface type.
@fxamacker fxamacker added the enhancement New feature or request label Dec 6, 2021
@fxamacker fxamacker added this to the v2.4.0 milestone Dec 6, 2021
@fxamacker fxamacker self-assigned this Dec 6, 2021
@Gui-Yom
Copy link

Gui-Yom commented Dec 6, 2021

Works like a charm for my usecase.

I think it might be important to specify that the value in the struct will always be a pointer.

@fxamacker
Copy link
Owner Author

fxamacker commented Dec 6, 2021

I think it might be important to specify that the value in the struct will always be a pointer.

I'll add a comment in the code for godoc and maybe also update the README to make this limitation clearer.

I need to find time to update the fuzz test and run it before merging. Likely this month unless something crazy unexpected happens.

Thanks again for requesting this and providing valuable feedback!

@fxamacker fxamacker merged commit 5ea68a6 into master Dec 29, 2021
@fxamacker fxamacker deleted the fxamacker/decode-registered-cbor-tag-to-registered-type branch December 29, 2021 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: support deserializing registered CBOR tag to an interface type
2 participants