BsonEncoder

@ExperimentalSerializationApi
interface BsonEncoder : Encoder, CompositeEncoder

The BsonEncoder interface

For custom serialization handlers

Functions

Link copied to clipboard
open fun beginCollection(descriptor: SerialDescriptor, collectionSize: Int): CompositeEncoder
Link copied to clipboard
abstract fun beginStructure(descriptor: SerialDescriptor): CompositeEncoder
Link copied to clipboard
abstract fun encodeBoolean(value: Boolean)
Link copied to clipboard
abstract fun encodeBooleanElement(descriptor: SerialDescriptor, index: Int, value: Boolean)
Link copied to clipboard
abstract fun encodeBsonValue(value: BsonValue)

Encodes a BsonValue

Link copied to clipboard
abstract fun encodeByte(value: Byte)
Link copied to clipboard
abstract fun encodeByteElement(descriptor: SerialDescriptor, index: Int, value: Byte)
Link copied to clipboard
abstract fun encodeChar(value: Char)
Link copied to clipboard
abstract fun encodeCharElement(descriptor: SerialDescriptor, index: Int, value: Char)
Link copied to clipboard
abstract fun encodeDouble(value: Double)
Link copied to clipboard
abstract fun encodeDoubleElement(descriptor: SerialDescriptor, index: Int, value: Double)
Link copied to clipboard
abstract fun encodeEnum(enumDescriptor: SerialDescriptor, index: Int)
Link copied to clipboard
abstract fun encodeFloat(value: Float)
Link copied to clipboard
abstract fun encodeFloatElement(descriptor: SerialDescriptor, index: Int, value: Float)
Link copied to clipboard
abstract fun encodeInline(descriptor: SerialDescriptor): Encoder
Link copied to clipboard
abstract fun encodeInlineElement(descriptor: SerialDescriptor, index: Int): Encoder
Link copied to clipboard
abstract fun encodeInt(value: Int)
Link copied to clipboard
abstract fun encodeIntElement(descriptor: SerialDescriptor, index: Int, value: Int)
Link copied to clipboard
abstract fun encodeLong(value: Long)
Link copied to clipboard
abstract fun encodeLongElement(descriptor: SerialDescriptor, index: Int, value: Long)
Link copied to clipboard
Link copied to clipboard
abstract fun encodeNull()
Link copied to clipboard
abstract fun <T : Any> encodeNullableSerializableElement(descriptor: SerialDescriptor, index: Int, serializer: SerializationStrategy<T>, value: T?)
Link copied to clipboard
open fun <T : Any> encodeNullableSerializableValue(serializer: SerializationStrategy<T>, value: T?)
Link copied to clipboard
abstract fun encodeObjectId(value: ObjectId)

Encodes an ObjectId

Link copied to clipboard
abstract fun <T> encodeSerializableElement(descriptor: SerialDescriptor, index: Int, serializer: SerializationStrategy<T>, value: T)
Link copied to clipboard
open fun <T> encodeSerializableValue(serializer: SerializationStrategy<T>, value: T)
Link copied to clipboard
abstract fun encodeShort(value: Short)
Link copied to clipboard
abstract fun encodeShortElement(descriptor: SerialDescriptor, index: Int, value: Short)
Link copied to clipboard
abstract fun encodeString(value: String)
Link copied to clipboard
abstract fun encodeStringElement(descriptor: SerialDescriptor, index: Int, value: String)
Link copied to clipboard
abstract fun endStructure(descriptor: SerialDescriptor)
Link copied to clipboard
open fun shouldEncodeElementDefault(descriptor: SerialDescriptor, index: Int): Boolean

Properties

Link copied to clipboard
abstract val serializersModule: SerializersModule