read

abstract fun <T : Any> read(type: KType, klass: KClass<T>): T?(source)

Reads this reader into an instance of type.

If it isn't possible to deserialize this BSON to the given type, an exception is thrown.