create a JSON value from an input in BSON format
Declared in <nlohmann/json.hpp>
template<typename T>
[[nodiscard, deprecated]]
static
basic_json
from_bson(
T const* ptr,
std::size_t len,
bool const strict = true,
bool const allow_exceptions = true);
Deprecated: Since 3.8.0; use from_bson(ptr, ptr + len). Use of this entity is allowed but discouraged.
a JSON value representing the input, or a discarded value if allow_exceptions is false and a parse error occurred
The return value should not be discarded.
| Name | Description |
|---|---|
| ptr | pointer to the start of the input |
| len | length of the input, in bytes |
| strict | whether to expect the input to be consumed until EOF |
| allow_exceptions | whether to throw exceptions in case of a parse error |