-
Type: Bug
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: 6.1.0
-
Component/s: js-bson
What problem are you facing?
When presented with the payload below BSON.deserialize returns the wrong buffer value, payload.message as well as payload.attachments.[number].content are buffers, while payload.message returns the correct buffer for it, payload.attachments.[number].content on the other hand returns an empty buffer.
{ "type": "message", "payload": { "message": "rs3PxIMZiwoLZn0+Jcdvmg==", "attachments": [ { "name": "My Facebook Page.txt", "content": "T+lvSaFiCnv5c6+wngbR5yYY9Tf9xviZPSB7q3R67IU8PWBO8ia7RlaiKoEn4nltvtOR6N8/ZFdhvm2Q3fKyq1kYlnWLJyzPvi5Oe72/CKanlmJCjjFTKwMaoDmD8ffffQEAYz24vaZQaF1T+YNCdwC6DCspUgPMxy3QAwK5SrmYBSpaQ91jwvDViWqH61JTQVRVLSdlAcKmxMiNivJ/wEikD7EO" } ] } }
EJSON does return the correct items, I could move to EJSON but it does feel bad to lose all the advantages BSON de-serialization provides.
What driver and relevant dependency versions are you using?
I'm using 6.1.0
Steps to reproduce?
The payload is provided above, I simply use BSON.deserialize.