ursus
11/17/2023, 1:16 PMMoshi
@Serializable
data class User(
val id: String,
val name: String,
val age: Int? = null <-----------
)
Is there a way to configure this, so I don't have to provide default value of null (just have the age
be optional?
It's very error pronejw
11/17/2023, 1:18 PMursus
11/17/2023, 1:19 PM?
to the type, not ? = null
Javier
11/17/2023, 1:25 PMString
. It would be doing assumptions.jw
11/17/2023, 1:26 PMJavier
11/17/2023, 1:29 PMursus
11/17/2023, 1:40 PMexplicitNulls = false
works, thanks!