[CXX-577] Creating BSON from JSON Created: 05/Apr/15  Updated: 07/Apr/15  Resolved: 07/Apr/15

Status: Closed
Project: C++ Driver
Component/s: Portability
Affects Version/s: legacy-1.0.0
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Steve Hickman Assignee: Unassigned
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any



 Description   

There doesn't appear to be any way to create a BSON object using an existing string of JSON formatted text. That would be pretty convenient for those of us already using JSON. It would mean that I can simply replace writing out a JSON string with creating a BSON object and updating the db - voila!



 Comments   
Comment by Andrew Morrow (Inactive) [ 05/Apr/15 ]

This functionality is available via the functions and classes found in $PREFIX/include/mongo/db/json.h, in particular see the function mongo::fromjson.

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