| 23702 | /// @sa https://json.nlohmann.me/api/basic_json/from_bson/ |
| 23703 | template<typename InputType> |
| 23704 | JSON_HEDLEY_WARN_UNUSED_RESULT |
| 23705 | static basic_json from_bson(InputType&& i, |
| 23706 | const bool strict = true, |
| 23707 | const bool allow_exceptions = true) |
| 23708 | { |
| 23709 | basic_json result; |
| 23710 | detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); |
| 23711 | auto ia = detail::input_adapter(std::forward<InputType>(i)); |
| 23712 | const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); |
| 23713 | return res ? result : basic_json(value_t::discarded); |
| 23714 | } |
| 23715 | |
| 23716 | /// @brief create a JSON value from an input in BSON format |
| 23717 | /// @sa https://json.nlohmann.me/api/basic_json/from_bson/ |
nothing calls this directly
no test coverage detected