The next MongoDB driver for Kotlin ktmongo.opensavvy.dev
README.md

Module Kotlin BSON #

Primitives for BSON types.

This module contains abstractions and utilities for implementing the BSON specification.

BSON objects are obtained from the [BsonFactory][opensavvy.ktmongo.bson.BsonFactory] interface. Each BSON implementation should provide its own implementation.

The KtMongo project provides two different implementations: :bson-official uses the official BSON Java driver, and :bson-multiplatform is a brand new implementation purely written in Kotlin Multiplatform. End-users are expected to depend on one of these two modules, instead of depending directly on :bson.

Depending on this module provides an easy way to declare utilities that work across BSON implementations. For example, this module contains a [BsonPath][opensavvy.ktmongo.bson.BsonPath] class that works for any BSON implementation.

The module :bson-tests provides unit tests to verify any new BSON implementation.

Package opensavvy.ktmongo.bson #

Utilities and primitives to read and write BSON documents.

[BsonDocument][opensavvy.ktmongo.bson.BsonDocument] and [BsonArray][opensavvy.ktmongo.bson.BsonArray] respectively represent BSON documents and arrays.

[BsonFactory][opensavvy.ktmongo.bson.BsonFactory] is the entry point to create new BSON documents.

[BsonPath][opensavvy.ktmongo.bson.BsonPath] provides a convenient way to search for data in a complex BSON document.

Package opensavvy.ktmongo.bson.types #

Data types specified in the BSON specification or in the MongoDB specification.