-
Notifications
You must be signed in to change notification settings - Fork 322
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
Decoding 'Maybe Whatever' with .: doesn't throw an error at compile time #614
Comments
there are good semantics for In fact, we have I'm afraid there is no simple way to change |
EDIT: we could make the default better by reworking whole |
I think we can close this. |
Decoding 'Maybe Whatever' with (.:) doesn't throw an error at compile time. It just lets you know that it fails at run time, throwing an error instead of returning Nothing when the key doesn't exist.
This really isn't ideal. Could the API be 'safe-by-default' and only allow you to decode Maybe Whatever with (.:?) and not (.:) ? In my use cases I've never wanted to fail at runtime if the key doesn't exist and I intended to decode 'Maybe Whatever' but forgot to update the FromJSON instance.
The text was updated successfully, but these errors were encountered: