Bson

interface Bson(source)

A BSON document.

To create instances of this class, see BsonContext.buildDocument.

Functions

Link copied to clipboard
infix inline fun <T> Bson.at(path: BsonPath): T

Finds the first value that matches path in a given BSON document.

Link copied to clipboard
inline fun <T : Any> Bson.read(): T?

Reads this document into an instance of type T.

Link copied to clipboard

Reads the fields of this document.

Link copied to clipboard
inline fun <T> Bson.select(path: BsonPath): Sequence<T>

Finds all values that match path in a given BSON document.

Link copied to clipboard
inline fun <T> Bson.selectFirst(path: BsonPath): T

Finds the first value that matches path in a given BSON document.

Link copied to clipboard

Low-level byte representation of this BSON document.

Link copied to clipboard
abstract override fun toString(): String

JSON representation of this Bson object, as a String.