jmfayard
10/25/2022, 8:33 AMhttpResponse.body<List<T>>()
fails on me with this error
Expected class kotlinx.serialization.json.JsonObject as the serialized body of kotlinx.serialization.Polymorphic<List>, but had class kotlinx.serialization.json.JsonArray
I tried to read the docs but they only speak about deserializing json objects.
Are json arrays being supported?jmfayard
10/25/2022, 8:34 AMBerkay Özkan
10/25/2022, 8:43 AMval body: List<Int> = response.body()
You can deserialize to list such response
[
123,
456
]
Berkay Özkan
10/25/2022, 8:43 AMBerkay Özkan
10/25/2022, 8:44 AM