Currently I'm handling missing JSON fields with `s...
# serialization
k
Currently I'm handling missing JSON fields with
someField: SomeType? = null
, is there a way without specifying
null
as default? For a nullable field, when it's missing I always want it set to
null
, so it seems a bit redundant...
g
It's against of overall approach of KotlinX.serialization to be strict and explicit, there is no such option to use null in case of missing value implicitly, only with default value But you can create a feature request for this