MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / basic_json from_bson

Function basic_json from_bson

extern/json/json.hpp:23748–23758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23746 /// @sa https://json.nlohmann.me/api/basic_json/from_bson/
23747 template<typename InputType>
23748 JSON_HEDLEY_WARN_UNUSED_RESULT
23749 static basic_json from_bson(InputType&& i,
23750 const bool strict = true,
23751 const bool allow_exceptions = true)
23752 {
23753 basic_json result;
23754 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23755 auto ia = detail::input_adapter(std::forward<InputType>(i));
23756 const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict);
23757 return res ? result : basic_json(value_t::discarded);
23758 }
23759
23760 /// @brief create a JSON value from an input in BSON format
23761 /// @sa https://json.nlohmann.me/api/basic_json/from_bson/

Callers

nothing calls this directly

Calls 4

input_adapterFunction · 0.85
moveFunction · 0.85
basic_jsonFunction · 0.85
sax_parseMethod · 0.80

Tested by

no test coverage detected