3 #include <bsoncxx/builder/stream/array.hpp>
4 #include <bsoncxx/builder/stream/document.hpp>
5 #include <bsoncxx/builder/stream/helpers.hpp>
6 #include <bsoncxx/json.hpp>
10 namespace bsoncxxbuilder = bsoncxx::builder::stream;
11 namespace bsoncxxdoc = bsoncxx::document;
17 std::string json(jsonVec.begin(), jsonVec.end());
20 std::vector<unsigned char> bson(view.length());
21 if (view.length() > 0)
23 std::memcpy(bson.data(), view.data(), view.length());
31 bsoncxx::document::view view(
data.data.data(),
data.data.size());
33 std::string
str = json.dump();
36 j.
data = std::vector<unsigned char>(
str.begin(),
str.end());
39 auto v = jsonConverter.
convert(j, p);