MongoDB C++ Driver
mongocxx-3.6.2
|
20 #include <bsoncxx/document/view.hpp>
21 #include <bsoncxx/stdx/optional.hpp>
23 #include <bsoncxx/config/prelude.hpp>
26 BSONCXX_INLINE_NAMESPACE_BEGIN
44 BSONCXX_API stdx::optional<document::view> BSONCXX_CALL
validate(
const std::uint8_t* data,
67 BSONCXX_API stdx::optional<document::view> BSONCXX_CALL
71 std::size_t* invalid_offset =
nullptr);
157 struct BSONCXX_PRIVATE impl;
158 std::unique_ptr<impl> _impl;
161 BSONCXX_INLINE_NAMESPACE_END
164 #include <bsoncxx/config/postlude.hpp>
void check_dollar_keys(bool check_dollar_keys)
Verifies that document keys are not preceeded with '$'.
bool check_utf8_allow_null() const
Getter for the current check_utf8_allow_null value of the underlying validator.
void check_utf8_allow_null(bool check_utf8_allow_null)
Verify that all keys and string values are valid UTF-8, but allow null bytes.
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
validator()
Constructs a validator.
stdx::optional< document::view > validate(const std::uint8_t *data, std::size_t length)
Validates a BSON document.
void check_utf8(bool check_utf8)
Verify that all keys and string values are valid UTF-8.
bool check_dot_keys() const
Getter for the current check_dot_keys value of the underlying validator.
void check_dot_keys(bool check_dot_keys)
Verifies that document keys do not contain any '.
bool check_dollar_keys() const
Getter for the current check_dollar_keys value of the underlying validator.
A validator is used to enable or disable specific checks that can be performed during BSON validation...
Definition: validate.hpp:76
bool check_utf8() const
Getter for the current check_utf8 value of the underlying validator.
~validator()
Destructs a validator.