You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to parse raw json using KMongo with kotlinx serialization
@Serializable
data classPersonInInDB(
var _id: String? = null,
@Contextual val updatedAt: Date,
var value: kotlinx.serialization.json.JsonObject,
)
java.lang.IllegalStateException: This serializer can be used only with Json format.Expected Decoder to be JsonDecoder, got class com.github.jershell.kbson.BsonFlexibleDecoder
at kotlinx.serialization.json.JsonElementSerializersKt.asJsonDecoder(JsonElementSerializers.kt:201)
at kotlinx.serialization.json.JsonElementSerializersKt.verify(JsonElementSerializers.kt:197)
at kotlinx.serialization.json.JsonElementSerializersKt.access$verify(JsonElementSerializers.kt:1)
at kotlinx.serialization.json.JsonObjectSerializer.deserialize(JsonElementSerializers.kt:161)
at kotlinx.serialization.json.JsonObjectSerializer.deserialize(JsonElementSerializers.kt:144)
at kotlinx.serialization.encoding.Decoder$DefaultImpls.decodeSerializableValue(Decoding.kt:257)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:16)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
Is it even possible?
The text was updated successfully, but these errors were encountered:
I'm unable to parse raw json using KMongo with kotlinx serialization
Is it even possible?
The text was updated successfully, but these errors were encountered: