[CDRIVER-1340] libbson serializes $binary to JSON in the wrong order Created: 21/Jun/16  Updated: 03/May/17  Resolved: 09/Jul/16

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Shane Harvey Assignee: Shane Harvey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

libbson outputs the binary type as

{"$type": "<t>", "$binary": "<b>"}

The correct order should be

{ "$binary": "<b>", "$type": "<t>"}

https://docs.mongodb.com/manual/reference/mongodb-extended-json/#binary



 Comments   
Comment by Githook User [ 01/Aug/16 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: PHPC-629: Fix $binary and $type field in extended JSON

The order of these fields was changed by CDRIVER-1340 (in libbson 1.4.0-beta1).
Branch: master
https://github.com/mongodb/mongo-php-driver/commit/d8f6ad276f728ff972ea8cb44af286d7ec08f380

Comment by Githook User [ 09/Jul/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #165 from ShaneHarvey/master

CDRIVER-1340 Serialize $binary and $type in the correct order
Branch: master
https://github.com/mongodb/libbson/commit/4ef9baddf8c2712cc5f7dc78b654b8ae46cb91ed

Comment by Githook User [ 09/Jul/16 ]

Author:

{u'username': u'ShaneHarvey', u'name': u'Shane Harvey', u'email': u'shane.harvey@mongodb.com'}

Message: CDRIVER-1340 Serialize $binary and $type in the correct order
Branch: master
https://github.com/mongodb/libbson/commit/8ca5ccfbee72622029ad1f9ebd650573816ed861

Generated at Wed Feb 07 21:12:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.