encode To Bson Value
fun <T> encodeToBsonValue(serializer: SerializationStrategy<T>, value: T): BsonValue
Content copied to clipboard
Serializes the given value into an equivalent BsonValue using the given serializer
Throws
kotlinx. serialization. Serialization Exception
if the given value cannot be serialized to EJSON