Package-level declarations

Utilities to read and write BSON.

Types

Link copied to clipboard
sealed interface AnyBsonWriter

Parent interface for type parameters that can accept either BsonValueWriter or BsonFieldWriter.

Link copied to clipboard
interface Bson

A BSON document.

Link copied to clipboard
interface BsonArray

A BSON array.

Link copied to clipboard

Utilities for decomposing a BsonArray into its elements.

Link copied to clipboard

Utilities for decomposing a Bson document into its fields.

Link copied to clipboard
interface BsonFactory

Entrypoint for creating Bson and BsonArray instances.

Link copied to clipboard

An object that can be represented as fields in a BSON document.

Link copied to clipboard

Generator of BSON document fields.

Link copied to clipboard
sealed interface BsonPath

Access specific fields in arbitrary BSON documents using a JSONPath-like API.

Link copied to clipboard
class BsonReaderException(message: String, cause: Throwable? = null) : IllegalStateException

Exception thrown when BSON reading fails.

Link copied to clipboard

The different data types supported in BSON documents.

Link copied to clipboard

Representation of a BSON value.

Link copied to clipboard

An object that can be represented as a BSON value (value of a field, item in an array, an array itself).

Link copied to clipboard

Generator of BSON values.

Link copied to clipboard
annotation class BsonWriterDsl

Annotation to mark types that are part of the BSON writer DSL.

Link copied to clipboard
annotation class ExperimentalBsonPathApi

Properties

Link copied to clipboard

Deprecation messages for BSON functionality that is deprecated in the BSON spec.

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
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
inline fun <T : Any> BsonFactory.write(obj: T): Bson

Writes an arbitrary Kotlin obj into a top-level BSON document.