Manuel Pérez Alcolea
03/08/2023, 2:22 AMList to JSON as value for a key ("items": [ {...}, {...} ]) but I'm getting an array with no key instead ([{...}, {...}]). I'm using ktor-serialization-kotlinx-json, how can I change this behavior?
@Serializable
data class Pages(val items: List<...>)
call.respond(listOf(...))ephemient
03/08/2023, 3:15 AMrespond(list) and not respond(Pages(list)) if you want it to be in the serialized outputManuel Pérez Alcolea
03/08/2023, 3:34 AMManuel Pérez Alcolea
03/08/2023, 3:34 AMManuel Pérez Alcolea
03/08/2023, 3:36 AM