Hello! I have a simple class: ```@Serializable dat...
# serialization
Hello! I have a simple class:
Copy code
data class CacheEntry<T>(
    val data: T,
    @SerialName("_id") val id: String,
    val lastUpdate: Instant = Clock.System.now()
And i need to look up its serializer from its Java
. I am writing a custom format and it has its serializer module initialized with:
Copy code
val serializersModule: SerializersModule = EmptySerializersModule()
And I do:
Copy code
override fun <T : Any> asDocument(`object`: T): Document =
        serializer = nitriteDocument.serializersModule.serializer(`object`.javaClass),
        element = `object`
But it errors with:
Copy code
kotlinx.serialization.SerializationException: Serializer for class 'CacheEntry' is not found.
Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied.
Yes the plugin is very much applied! Any clue why this happens?
there is no generic serializer, it needs the serializer for the type parameters
which isn't carried in the run-time Class due to erasure