withDocumentClass
@ExperimentalKBsonSerializerApi
Get an instance of the same collection with a different set of default types serialization.
Parameters
eJson
the EJson serializer that the MongoCollection should use to convert objects and primary keys with. Will default to the databases EJson instance. For details on configuration of serialization see MongoClient.