hugo.matilla
04/20/2022, 2:13 PM{
"0": {"name": "John"},
"1": {"name": "Jane"},
"2": {"name": "Pete"},
...
}
I'm super new to the Serialization library, and I can't find which will be the best approach to deserialize it and have the id as part of the object? Something like this:
Person (id: Int, name: String)
Thank you🙂Paul Woitaschek
04/20/2022, 2:28 PMPaul Woitaschek
04/20/2022, 2:28 PMPaul Woitaschek
04/20/2022, 2:28 PMhugo.matilla
04/20/2022, 3:20 PMhugo.matilla
04/20/2022, 3:47 PM{
"0": {"name": "John"},
"1": {"name": "Jane"},
"2": {"name": "Pete"},
...
}
and not
[
"0": {"name": "John"},
"1": {"name": "Jane"},
"2": {"name": "Pete"},
...
]
hugo.matilla
04/20/2022, 3:49 PMError kotlinx.serialization.json.internal.JsonDecodingException: Expected start of the array '[', but had 'EOF' instead
Paul Woitaschek
04/20/2022, 4:00 PM