I've been getting this exception whilst trying to ...
# serialization
r
I've been getting this exception whilst trying to decode any class with fields with type arguments:
Copy code
java.lang.AbstractMethodError: 'kotlinx.serialization.KSerializer[] kotlinx.serialization.internal.GeneratedSerializer.typeParametersSerializers()'
Full stacktrace: https://pastes.dev/UaaPnH2ZPY My code:
Copy code
@Serializable
@SerialName("data")
public data class DataMatcher(
  public val predicate: Map<String, String>
) : ServerMatcher { ... }
where
ServerMatcher
is a sealed serializable interface. I'm using 1.8.1.
1
a
@sandwwraith ^^
I have the same with Spring Boot
But even for a simple class like this:
Copy code
@Serializable
@kotlin.js.JsExport
data class OwnerFieldsDto(
    val firstName: String,
    val lastName: String,
    val address: String,
    val city: String,
    val telephone: String
)
s
You have 1.7.x somewhere in your classpath. Try to force 1.8.1 dependency version. https://github.com/Kotlin/kotlinx.serialization/issues/2968