I'm posting json array of objects. I'm trying to parse it in code like this
val objs = call.receive<List<MyClass>>() // this work fine
val name objs[0].name // this throw exception LinkedTreeMap cannot be cast to MyClass
In above code second line throws exception com.google.gson.internal.LinkedTreeMap cannot be cast to MyClass
If i post simple object and parse it in ktor with call.receive<MyClass>()
then it will work fine. So issue is only when parsing list of objects.