Damien
01/17/2021, 8:07 PMsealed class A ()
data class B(val name) : A()
data class C(val name): A()
My endpoint returns a List<A> and according to https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#sealed-classes I would expect the following format:
[
{
"type": "com.A",
"name": "name"
}
]
And I am getting this format when Log the response object. Unfortunately, I got another response format when calling the endpoint:
[
[
"com.A",
{
"name": "name"
}
]
]
Any ideas why this different format appears when responding with call.respond(object)?Ivan Pavlov
01/17/2021, 8:47 PMDamien
01/17/2021, 10:00 PMDamien
01/17/2021, 10:02 PM