Hi, I’m trying to make a request and expect to rec...
# ktor
j
Hi, I’m trying to make a request and expect to receive an array of objects but ktor is not serializing it to
List<MyClass>
That’s what I’m receiving:
Copy code
io.ktor.serialization.JsonConvertException: Illegal input: Expected class kotlinx.serialization.json.JsonObject as the serialized body of kotlinx.serialization.Polymorphic<List>, but had class kotlinx.serialization.json.JsonArray
Any ideas on why this is happening? I’m running my app natively
a
Can you share the response body JSON?
j
I can’t, sorry But it’s a JsonArray
😅 1