Serializer
Default serializer for ObjectId.
When serializing to BSON
ObjectId instances are encoded using MongoDB's native BsonType.ObjectId 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, ObjectId instances are represented as 24-characters hex strings.