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
Feature Request: default values #944
Comments
You can use It's not in the docs yet, sorry. |
Did you read my request complete? I want to use:
So it's not possible to use it that way. Right? |
Yes, it will work, the deserializer uses builders so setting a default on the builder affects it. |
@daohoangson So this code eg will do the trick?
|
Not the factory--the
|
Should be documented as part of #1051 |
I would like to use the serializer/deserializer for built value classes, but if the input data doesn't contain all values, it would be helpful to initialize the values with a value, instead of null - so every property needs to be marked as @nullable which is bad behavior..
What's the best way to do it, if it's already possible? If it's not possible a new attribute for @BuiltValueField like default would be fine.
The text was updated successfully, but these errors were encountered: