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 for default parameter values in generic #65
Comments
Something like milessabin/shapeless#459 would allow to address that (default field values can easily be pulled like in this test). |
One general question: should this be the behavior provided by implicit val decodeBar: Decoder[Bar] = deriveFor[Bar].decoderWithDefaults |
I don't know what the benefit is to having it in |
@trane It's not necessarily obvious that a derived decoder will use default constructor values (when they're needed), and if that's not the behavior you want, it could be an unpleasant surprise. But I agree—I think it makes sense to use them (with plenty of documentation) in |
@travisbrown don't trust my point of view, I've been coding in Ruby for the past 2 years -- of course I like magic and surprising behavior! |
@travisbrown @trane Was this ever added by any chance? I was playing around this morning and hit this issue so was unsure if I am missing something? |
@travisbrown I was figuring out how it can be implemented and ended up with the following. |
This is now available in circe-extras in 0.6.0-RC1. |
This appears to be mostly shapeless related, but @travisbrown asked me to file this for posterity...
The text was updated successfully, but these errors were encountered: