Serializer¶
@LowLevelApi
object Serializer : KSerializer<Timestamp>
Default serializer for Timestamp.
When serializing to BSON¶
Timestamp instances are encoded using MongoDB's native BsonType.Timestamp BSON type.
Supported drivers:
-
The official
:bson-kotlinxserialization library. -
The KtMongo Multiplatform driver.
When serializing to other formats¶
When serializing to other formats, like JSON, Timestamp instances are represented as a string that contains the instant in ISO 8601 format followed by a hash symbol (#) and the counter as a decimal number.
For example, 2022-02-32T12:58:01#32.
Properties¶
descriptor¶
open override val descriptor: SerialDescriptor
Functions¶
deserialize¶
open override fun deserialize(decoder: Decoder): Timestamp