MongoDB C++ Driver 4.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
json.hpp File Reference

Description

Provides utilities to convert between BSON and JSON representations.

Go to the source code of this file.

Namespaces

namespace  bsoncxx
 The top-level namespace within which all bsoncxx library entities are declared.
 
namespace  bsoncxx::v_noabi
 Declares entities whose ABI stability is NOT guaranteed.
 

Enumerations

enum class  bsoncxx::v_noabi::ExtendedJsonMode : std::uint8_t
 An enumeration of the types of Extended JSON that the to_json function accepts. More...
 

Functions

document::value bsoncxx::from_json (stdx::string_view json)
 Constructs a new document::value from the provided JSON text.
 
document::value bsoncxx::v_noabi::from_json (stdx::string_view json)
 Constructs a new document::value from the provided JSON text.
 
document::value bsoncxx::v_noabi::operator""_bson (char const *json, size_t len)
 Constructs a new document::value from the provided JSON text. This is the UDL version of from_json().
 
std::string bsoncxx::to_json (document::view view, ExtendedJsonMode mode=ExtendedJsonMode::k_legacy)
 Converts a BSON document to a JSON string, in extended format.
 
std::string bsoncxx::v_noabi::to_json (array::view view, ExtendedJsonMode mode=ExtendedJsonMode::k_legacy)
 Converts a BSON document to a JSON string, in extended format.
 
std::string bsoncxx::v_noabi::to_json (document::view view, ExtendedJsonMode mode=ExtendedJsonMode::k_legacy)
 Converts a BSON document to a JSON string, in extended format.