[CXX-1712] Overload bsoncxx::to_json to accept a bsoncxx::array::view Created: 09/Jan/19  Updated: 28/Oct/23  Resolved: 20/Jun/23

Status: Closed
Project: C++ Driver
Component/s: API
Affects Version/s: None
Fix Version/s: 3.8.0

Type: Improvement Priority: Major - P3
Reporter: Karl-Gustav Johansson Assignee: Josh Siegel (Inactive)
Resolution: Fixed Votes: 1
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongo-cxx-driver-r3.3.0
Windows 10 x64
Visual Studio 2017


Issue Links:
Depends
depends on CDRIVER-4659 Add extended json output capability f... Closed
Epic Link: CXX usability improvements
Quarter: FY24Q3

 Description   

Here's a full description of the issue:

https://stackoverflow.com/questions/53016213/converting-a-bson-document-containing-an-array-to-json-removes-the-array-from-t



 Comments   
Comment by Githook User [ 20/Jun/23 ]

Author:

{'name': 'Joshua Siegel', 'email': '39130209+joshbsiegel@users.noreply.github.com', 'username': 'joshbsiegel'}

Message: CXX-1712 overload to_json to handle bson arrays (#976)
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/94fa3d2ef29d17400ec3a2b778b5b3dc46feb1ac

Comment by Kevin Albertson [ 10/Jan/19 ]

Hi Karl-Gustav. Thank you for filing this! As acm mentioned in the stackoverflow comments, the C++ driver should provide an overload of bsoncxx::to_json accepting a array view. I'm updating the title of the ticket to reflect that.

Generated at Wed Feb 07 22:03:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.