--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c424649f-b9b6-4487-ac3f-6a80f2938852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/fcee100e-57eb-4361-b371-3e54ae01ac67%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/9e8f760c-e47b-4004-aab4-b158614ba58b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/869cb07f-fae4-426c-99c2-9efec7e76699%40googlegroups.com.
document docu{};
std::string obj_value = "{\"id1\":\"val1\", \"id2\":\"val2\"}";
docu << "obj_name" << obj_value;
std::string output = bsoncxx::to_json(docu.view());
Hi,here is all the code needed to recreate the issue:document docu{};
std::string obj_value = "{\"id1\":\"val1\", \"id2\":\"val2\"}";
docu << "obj_name" << obj_value;
std::string output = bsoncxx::to_json(docu.view());
this is the output, with the unnecessary parentheses:{"_id" : {"$oid" : "5766593d016b8e7ed95def61"},"obj_name" : "{"id1":"val1", "id2":"val2"}"}
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7577dc02-6427-47d4-98cb-8c353e703786%40googlegroups.com.
{ title: "MongoDB: The Definitive Guide", author: [ "Kristina Chodorow", "Mike Dirolf" ], published_date: ISODate("2010-09-24"), pages: 216, language: "English", publisher: { name: "O'Reilly Media", founded: 1980, location: "CA" } }
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/E48TJbBXHRk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHX05qHHdAPGC72-71HPgO%3Dm6y_WZwMG%3DUXM-QNgTBvBgB1UjQ%40mail.gmail.com.
bsoncxx::document::value MyfancyDocument = document{} << ... << open_document << "myKey" << "MyVal" << close_document << ... << finalize; To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/be17a535-baa8-4fc0-a3da-c4a92b1e5d33%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/704b5db9-fc52-4319-8339-91f247e088bf%40googlegroups.com.