``` ...
# ktor
p
Copy code
io.ktor.client.call.NoTransformationFoundException: No transformation found: class io.ktor.utils.io.ByteBufferChannel (Kotlin reflection is not available) -> class com..ApiResponse (Kotlin reflection is not available)
am trying to parse an array of ints but seems impossible
Copy code
{
  "numbers": [
    4, 150,...
  ]
}
obj am using is
Copy code
@Serializable
class ApiResponse(val numbers: Array<Int>)
calling it like this
Copy code
val response: ApiResponse = httpClient.get(url).body()
a
Can you tell me if you target the Kotlin/Native?
p
am using kotlin multiplatform project am trying to have the same parser for both platforms
any ideas @Aleksei Tirman [JB]?
a
Unfortunately, I cannot reproduce your problem with the following code: Client:
Copy code
val client = HttpClient(Darwin) {
    install(ContentNegotiation) {
        json()
    }
}
val r = client.get("<http://localhost:4444/>").body<ApiResponse>()
println(r.numbers.first())
Server:
Copy code
embeddedServer(Netty, port = 4444) {
    routing {
        get("/") {
            call.respondText(contentType = ContentType.Application.Json) { """
                {
                  "numbers": [
                    4, 150, 6, 8
                  ]
                }
            """.trimIndent() }
        }
    }
}.start(wait = true)
p
@Aleksei Tirman [JB] could it be is the client this is android am using
a
So you’re running your code on an Android emulator or Android physical device?