Skip to content

Kotlin BSON • Multiplatform abstraction for different BSON implementationsopensavvy.ktmongo.bsonBson

Bson

interface Bson

A BSON document.

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

Functions

reader

@LowLevelApi
abstract fun reader(): BsonDocumentReader

Reads the fields of this document.

toByteArray

@LowLevelApi
abstract fun toByteArray(): ByteArray

Low-level byte representation of this BSON document.

toString

abstract override fun toString(): String

JSON representation of this Bson object, as a String.