Hello all. I'm getting a hard time with kotlinx se...
# announcements
r
Hello all. I'm getting a hard time with kotlinx serialization. Can anyone help?
I have a Command class, which in the message attribute, can be any other class. In this example I will use the Client class.
Sem título
Sem título
But i'm getting the following error
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
k
#serialization
Is this during serialisation or deserialisation, and to what format are you serialising?
r
During serialization. Json -> Object kt
k
What does your JSON look like?
r
Sem título