The following code (runnable with ammonite)import $ivy.`org.reactivemongo::reactivemongo:0.13.0`
import reactivemongo.api._
import reactivemongo.bson.buffer.ArrayBSONBuffer
import reactivemongo.bson.{BSONDecimal, BSONDocument}
val bd = BSONDecimal.parse("12.76")
val el = BSONDocument("d" -> bd.get)
val pack = BSONSerializationPack
val buffer = new ArrayBSONBuffer
pack.writeToBuffer(buffer, el)
println(buffer.array.map("%02X" format _).mkString)
prints 180000001364000000000000003C30FC0400000000000000
while BSON corpus gives 18000000136400FC040000000000000000000000003C3000
here
Any thoughts?