https://kotlinlang.org logo
#ktor
Title
# ktor
c

coder82

02/27/2019, 11:18 AM
How does kotlinx serialization library deserialize a json array if strings? Does it turn into a List<String> or rather an Array<String> ?
e

e5l

02/27/2019, 11:19 AM
@sandwwraith
s

sandwwraith

02/27/2019, 11:20 AM
I assume that ktor-client would give you
List
c

coder82

02/27/2019, 11:21 AM
ok
indeed I am just looking to the default deserialization, no custom stuff
I receive an array of errors like this for example
"errors":["user identifier is invalid", "this error", "that error"]
and that's even optional so I was thinking to define it like this in my data class:
@Optional val errors: List<String> = emptyList()
3 Views