Hi everyone! I’m using Ktor to deserialise a List ...
# ktor
a
Hi everyone! I’m using Ktor to deserialise a List of objects from an API (multiplatform, actually testing on ios). I configured the HttpClient like this:
Copy code
private val client = HttpClient {
        install(Logging) {
            logger = Logger.DEFAULT
            level = LogLevel.ALL
        }

        install(JsonFeature) {
            serializer = KotlinxSerializer(JSON.nonstrict).apply {
                registerList<Category>()
            }
        }
    }
and when I make a call with
Copy code
client.get<List<Category>> { //...
I get:
No transformation found: class io.ktor.client.features.observer.DelegatedResponse -> class kotlin.collections.List