I want to find out the BSON document size before updating the document, using Scala and reactiveMongo - lib.
Working with the old lib(2.12) the equivalent code -
val bsonDoc = EntityBSONHandler.write(entity)
val size = BSONDocumentBufferHandler
.write(bsonDoc, ChannelBufferWritableBuffer())
.toReadableBuffer()
.size
I could not figure out the new implementation with version 2.13 or later.
Thank you.