Kotlin BSON • Multiplatform abstraction for different BSON implementations • opensavvy.ktmongo.bson.types • ObjectId • Serializer
Serializer¶
@ExperimentalTime
@LowLevelApi
class Serializer : KSerializer<ObjectId>
Default serializer for ObjectId.
:bson-multiplatform and :bson-official both override this serializer. This serializer exists so that @Contextual is not required. It may also be used to convert the DTOs to other formats, like JSON.
Using this serializer, ObjectId is represented as if it were a String.
Avoid interacting with this type directly.
Constructors¶
Serializer¶
constructor()
Properties¶
descriptor¶
open override val descriptor: SerialDescriptor
Functions¶
deserialize¶
open override fun deserialize(decoder: Decoder): ObjectId