Why variable that starts with `is` is omitted whil...
# serialization
a
Why variable that starts with
is
is omitted while serialization? I have data class
Copy code
@Serializable
public data class Config(
    val isVariable: String,
    val anotherVariable: String
)

Config("omit", "value")
Output will be:
Copy code
{anotherVariable:"value"}
P.S. isVariable should be boolean, I know, anyway it should be a String in my case
e
that example works fine for me, producing
{"isVariable":"omit","anotherVariable":"value"}
(Kotlin 1.7.0, kotlinx.serialization 1.3.3). do you have a default vaule of
isVariable
?
a
Kotlin 1.7.0, kotlinx.serialization 1.3.3 - same config no default value
hm, seems problem with content negotiation in ktor
Copy code
install(ContentNegotiation) {
    json(
        Json {
            ignoreUnknownKeys = true
            isLenient = true
        }
    )
}
serialization (encodeToString) works fine