And I am getting this format when Log the response object. Unfortunately, I got another response format when calling the endpoint:
Copy code
[
[
"com.A",
{
"name": "name"
}
]
]
Any ideas why this different format appears when responding with call.respond(object)?
i
Ivan Pavlov
01/17/2021, 8:47 PM
I fixed same behavior by configuring arrayPolymorphism parameter for json configuration in install method. Unfortunately I don't have a laptop so I can't easily find a proper code snippet for this case
d
Damien
01/17/2021, 10:00 PM
I added the configuration, but it didn't solve my problem
Damien
01/17/2021, 10:02 PM
Now I fixed it. the value must be changed to false, wich is also the default of kotlinx.serialization in normal usage. Thank you for the hint.