read

inline fun <T : Any> Bson.read(): T?(source)

Reads this document into an instance of type T.

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

See also

BsonContext.write

The inverse operation.