We have a binary value in a document that serializes to the screen in the mongo shell as:
{ "myField": BinData(2,"BINDATAHERE") }
but in the Java driver it's serializing as
{ "myField": <Binary Data> }
According to the Mongo extended JSON doc it should be serializing as:
{ "myField": { "$binary": "BINDATAHERE", "$type": "2" } }