MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / basic_json from_ubjson

Function basic_json from_ubjson

Source/external/json.hpp:23619–23629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23617 /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/
23618 template<typename InputType>
23619 JSON_HEDLEY_WARN_UNUSED_RESULT
23620 static basic_json from_ubjson(InputType&& i,
23621 const bool strict = true,
23622 const bool allow_exceptions = true)
23623 {
23624 basic_json result;
23625 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
23626 auto ia = detail::input_adapter(std::forward<InputType>(i));
23627 const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict);
23628 return res ? result : basic_json(value_t::discarded);
23629 }
23630
23631 /// @brief create a JSON value from an input in UBJSON format
23632 /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/

Callers

nothing calls this directly

Calls 3

input_adapterFunction · 0.85
basic_jsonFunction · 0.85
sax_parseMethod · 0.80

Tested by

no test coverage detected