-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Property default values not working #27
Comments
Just stumbled upon this myself. They work with native default values IF they come after ones without default values. |
Sprinkled some debugs into the Serde source and for the test case above the shouldUseDefault property currently always evaluates to |
The tests already cover a whole bunch of default values. Is this limited to when the default value being set is null, perhaps? |
Also, try on the |
No luck. Tested with current master:
|
Resolved in #31. I'm shocked that bug managed to survive so long, honestly. I could have sworn there was a test for that case. But it's been resolved, and supports null as a default value, too. (Which required some fun enum dancing.) |
Thanks for the swift fix! One more thing I noticed while working with defaults, would it make sense to also add a |
The |
Detailed description
Not sure if I'm missing something obvious or if this is a regression in Serde, but I can't seem to get property default values for deserialization working at all:
I have tried a couple different ways, even the php default values in the constructor are not working.
Your environment
The text was updated successfully, but these errors were encountered: