[SERVER-9750] BSONObj::toString produces empty object syntax for empty arrays Created: 22/May/13  Updated: 11/Jul/16  Resolved: 22/May/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.1

Type: Bug Priority: Minor - P4
Reporter: Andrew Morrow (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Calling toString on a BSONObj representing '

{ x : [] }

' returns a string like { x : {} }, which changes the type of X when round tripped.



 Comments   
Comment by Andrew Morrow (Inactive) [ 22/May/13 ]

Fixed in mainline. LMK if worth backporting to 2.4 after triaging.

Comment by auto [ 22/May/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-9750 Fix BSONObj::toString handling of empty arrays
Branch: master
https://github.com/mongodb/mongo/commit/6a7413d9c28534b0f5e507787ed522c95914df9d

Generated at Thu Feb 08 03:21:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.