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

Support DisallowUnknownKeys option #27

Open
ansel1 opened this issue Feb 5, 2018 · 2 comments
Open

Support DisallowUnknownKeys option #27

ansel1 opened this issue Feb 5, 2018 · 2 comments
Assignees

Comments

@ansel1
Copy link

ansel1 commented Feb 5, 2018

Not crazy about the name, but essentially an option like gorilla/schema's IgnoreUnknownKeys option. Useful for really strict validation of incoming query params.

@deankarn
Copy link
Contributor

deankarn commented Feb 5, 2018

💡 I like the idea @ansel1

I’ll have to think about how to implement as this library sets the data from the structs perspective and not the incoming data, but I’ll figure something out

@deankarn deankarn self-assigned this Feb 5, 2018
@ansel1
Copy link
Author

ansel1 commented Feb 5, 2018

maybe add a slice or map to decoder to track used keys, then compare to original values at the end of Decoder.Decode()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants