When deserializing JSON, can I set a default value...
# serialization
l
When deserializing JSON, can I set a default value for a nullable field? I.e. make the field non-nullable, and when it is
null
in the JSON, overwrite it? Or does it only work with a custom parser?
Ok, looks like I need this:
Copy code
Use 'coerceInputValues = true' in 'Json {}` builder to coerce nulls to default values.