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

Function basic_json from_ubjson

Source/Utils/json.hpp:24217–24227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24215 */
24216 template<typename InputType>
24217 JSON_HEDLEY_WARN_UNUSED_RESULT
24218 static basic_json from_ubjson(InputType&& i,
24219 const bool strict = true,
24220 const bool allow_exceptions = true)
24221 {
24222 basic_json result;
24223 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
24224 auto ia = detail::input_adapter(std::forward<InputType>(i));
24225 const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict);
24226 return res ? result : basic_json(value_t::discarded);
24227 }
24228
24229 /*!
24230 @copydoc from_ubjson(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