MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / basic_json from_bson

Function basic_json from_bson

Source/Utils/json.hpp:24330–24340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24328 */
24329 template<typename InputType>
24330 JSON_HEDLEY_WARN_UNUSED_RESULT
24331 static basic_json from_bson(InputType&& i,
24332 const bool strict = true,
24333 const bool allow_exceptions = true)
24334 {
24335 basic_json result;
24336 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
24337 auto ia = detail::input_adapter(std::forward<InputType>(i));
24338 const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict);
24339 return res ? result : basic_json(value_t::discarded);
24340 }
24341
24342 /*!
24343 @copydoc from_bson(detail::input_adapter&&, const bool, const bool)

Callers

nothing calls this directly

Calls 3

input_adapterFunction · 0.85
sax_parseMethod · 0.80
basic_jsonFunction · 0.70

Tested by

no test coverage detected