Package org.mongodb.kbson.serialization

Types

Link copied to clipboard
object Bson
Link copied to clipboard
sealed class EJson : StringFormat

Main entry point to work with EJSON serialization. EJSON is a JSON format that can be used to encode all BSON datatypes.

Functions

Link copied to clipboard
inline fun <T : Any> EJson.decodeFromBsonValue(value: BsonValue): T

Deserializes the given value element into a value of type T using a deserializer retrieved from reified type parameter.

Link copied to clipboard
fun EJson(ignoreUnknownKeys: Boolean = true, serializersModule: SerializersModule = EmptySerializersModule): EJson

Creates an instance of EJson configured with a ignoreUnknownKeys and a custom serializersModule.

Link copied to clipboard
inline fun <T : Any> EJson.encodeToBsonValue(value: T): BsonValue

Serializes the given value into an equivalent BsonValue using a serializer retrieved from reified type parameter.