@Serializable
open class A {
val default: String = "hello"
}
@Serializable
open class B(val value: String): A()
fun main(){
val obj = B("foo")
val str = Json.encodeToString(obj)
println(str)
}
encoding result:
{"default":"hello","value":"foo"}
Why the default value is encoded while the encodeDefaults config is false?