https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
n

nrobi

12/23/2019, 11:57 AM
Did anyone struggle with
kotlinx-serialization
? I’m using
0.14.0
, and I’m gettin pretty randomly
java.lang.NoClassDefFoundError:
, some time it works, some time it doesn’t 🤷
Also what’s the best way to handle
List
parsing in a generic way?
m

molikuner

12/23/2019, 2:33 PM
There is a
KSerializer<T>.list
. Thats probably the most generic think you can get. Maybe via reflection a little bit more, but I wouldn’t recommend it. What do you need exactly?
n

nrobi

12/24/2019, 11:48 AM
Yes, I use that on the client side. What I want is to be able to parse a json, which has a
field: List<T>
with
call.receive<MyModel>
3 Views