Hi everyone, is it possible to write a custom dese...
# serialization
t
Hi everyone, is it possible to write a custom deserializer for JSON arrays wrapped in an object ? As you probably know, this is a common practice that protects against JSON hijacking.
Copy code
{
   "some_random_key": [ /* interesting payload */ ]
}

// I'd like to use it automatically when deserializing list of foos.
val foos = httpClient.get<List<Foo>>(url)
I'm using Ktor Client with Moshi, and I'd like to replace it with kotlinx.serialization.