I am using Kotlinx serialization in a Ktor-app, and looking for an equivalent of Jacksons @JsonIgnoreProperties(ignoreUnknown = true) annotation. I am aware of the
install(ContentNegotiation) {
json(Json{ ignoreUnknownKeys = true })
}
I have a number of classes annotated @Serializable. Is there a way to apply ignoreUnknownKeys to one type class/type only, like I could do with Jackson?