asDocument

fun asDocument(): BsonDocument

Gets this value as a BsonDocument if it is one, otherwise throws exception

Return

a BsonDocument

Throws

if this value is not of the expected type