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

Restriction on input struct from user to Unmarshal values with annotation #109

Open
R-maan opened this issue Jul 28, 2020 · 0 comments
Open

Comments

@R-maan
Copy link
Contributor

R-maan commented Jul 28, 2020

Unmarshal provides a way to include annotations of Ion values. In order to do so, user needs to send a specific data structure, which is a struct with exactly 2 fields, one with ion:",annotation" tag, and the other a type which can hold the Ion value after decoding (in terms of type).

In the code base, unmarshal.go:

// expected struct for decoding Ion values must have only 2 fields: one has `ion:",annotation"`
// tag, and the other field must be of a type where Ion value can be decoded to.
func isValidAnnotatableStruct(v reflect.Value, listofkinds []reflect.Kind) (bool, error) {
@therapon therapon changed the title Restriction on input strut from user to Unmarshal values with annotation Restriction on input struct from user to Unmarshal values with annotation Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant