BsonValue
Implementation of opensavvy.ktmongo.bson.BsonValue based on the official MongoDB drivers.
The BSON specification only allows root documents, so it is not possible to instantiate this interface directly with a complex structure. This interface is used to decode the fields of a BsonDocument or the items of a BsonArray.
To instantiate a BsonDocument or BsonArray, see BsonFactory.
This page describes the BSON implementation based on the official MongoDB drivers. To learn more about the general BSON operations, see opensavvy.ktmongo.bson.BsonArray.
Navigating BSON types
This interface is part of the BSON trinity:
BsonDocument represents an entire BSON document.
BsonArray represents an array of BSON values.
BsonValue represents a single value in isolation.
Usage
If this BSON value is the serialized form of a Kotlin DTO, see decode.
This interface provides methods for decoding the different BSON native types, like decodeInt32, decodeObjectId and decodeInstant.
Some BSON types cannot be represented by a single Kotlin type, so multiple methods are provided to decode their components. For example: decodeRegularExpressionPattern and decodeRegularExpressionOptions.
Implementation of a KtMongo opensavvy.ktmongo.bson.BsonValue that wraps a org.bson.BsonValue.
To create an instance of this class, see BsonFactory.readValue.
Types
Serializer for the official opensavvy.ktmongo.bson.official.BsonValue implementation.