asValue

abstract fun asValue(): BsonValue(source)

Returns the BsonValue equivalent to this document.

The returned value has type BsonType.Document and its BsonValue.decodeDocument method returns this document.