19 #include <bsoncxx/array/view.hpp>
20 #include <bsoncxx/document/value.hpp>
21 #include <bsoncxx/document/view.hpp>
22 #include <bsoncxx/stdx/optional.hpp>
24 #include <bsoncxx/config/prelude.hpp>
27 inline namespace v_noabi {
48 BSONCXX_API std::string BSONCXX_CALL
to_json(document::view view,
51 BSONCXX_API std::string BSONCXX_CALL
to_json(array::view view,
64 BSONCXX_API document::value BSONCXX_CALL
from_json(stdx::string_view json);
80 BSONCXX_API document::value BSONCXX_CALL
operator"" _bson(
const char* json,
size_t len);
85 #include <bsoncxx/config/postlude.hpp>
std::string to_json(document::view view, ExtendedJsonMode mode=ExtendedJsonMode::k_legacy)
Converts a BSON document to a JSON string, in extended format.
ExtendedJsonMode
An enumeration of the types of Extended JSON that the to_json function accepts.
Definition: json.hpp:30
@ k_relaxed
to produce Relaxed Extended JSON
@ k_legacy
to produce Legacy Extended JSON
@ k_canonical
to produce Canonical Extended JSON
document::value from_json(stdx::string_view json)
Constructs a new document::value from the provided JSON text.
The top-level namespace for bsoncxx library entities.
Definition: element.hpp:24