Skip to content
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

Relax data model nullability #1

Closed
DrewCarlson opened this issue May 30, 2020 · 1 comment · Fixed by #3
Closed

Relax data model nullability #1

DrewCarlson opened this issue May 30, 2020 · 1 comment · Fixed by #3
Milestone

Comments

@DrewCarlson
Copy link
Owner

Some model values are nullable even though they have a reasonable defaults because the incoming json has null for those fields. If these fields are not nullable serialization will fail when it encounters a null value instead of using the default. This behavior cannot be changed yet: Kotlin/kotlinx.serialization#246

@DrewCarlson
Copy link
Owner Author

This can be fixed using serialization 1.0-M1 using the coerceInputValues flag added in Kotlin/kotlinx.serialization#853.

@DrewCarlson DrewCarlson linked a pull request Aug 6, 2020 that will close this issue
@DrewCarlson DrewCarlson added this to the v1 milestone Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant