decodeFromBsonValue

fun <T> decodeFromBsonValue(deserializer: DeserializationStrategy<T>, value: BsonValue): T

Deserializes the given value into a value of type T using the given deserializer.

Throws

kotlinx.serialization.SerializationException

if the given EJSON element is not a valid EJSON input for the type T