-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Error or warn on unknown fields #37
Comments
@soenkehahn You'd have to write your own decoder, but I think it's possible because we know all the fields statically. |
Thanks for the reply! Are you saying it's possible for me to implement this without modifying |
@soenkehahn Sorry I've not been very clear. It's easy for me to forget context that I only have because I wrote this code. A autodocodec/autodocodec/src/Autodocodec/Aeson/Decode.hs Lines 31 to 37 in fa4d53e
You could write your own version to warn or reject on unknown fields. |
Is it possible to add support for this (decoder?) to the library so that users can configure this behaviour. I know you have already closed this but would you accept a pull request? |
@Icelandjack I think my "closed" communication was not clear. I just meant that I haven't planned to add it myself. A PR would be welcome! |
Is it possible to use
autodocodec
to parse json or yaml while either failing or warning on unknown fields?aeson
provides rejectUnknownFields, but I couldn't find a way to plug in Options intoautodocodec
.The text was updated successfully, but these errors were encountered: