<Kotlin - Ktor Optional API resource field handlin...
# stackoverflow
u
Kotlin - Ktor Optional API resource field handling When implementing a REST API with Ktor (and Kotlin), it supports the optional field handling of Kotlin. Which works for POST and GET, but what about UPDATE? For example, you have the following resource: @Serializable data class MyAddress( var line1: String? = null, var line2: String? = null, var city: String? = null, var postal_code: String? = null, var state: String? = null, var country: String? = null ) So all MyAddress fields are optional (with a default value)....