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

Function basic_json from_msgpack

Source/Utils/json.hpp:24101–24111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24099 */
24100 template<typename InputType>
24101 JSON_HEDLEY_WARN_UNUSED_RESULT
24102 static basic_json from_msgpack(InputType&& i,
24103 const bool strict = true,
24104 const bool allow_exceptions = true)
24105 {
24106 basic_json result;
24107 detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);
24108 auto ia = detail::input_adapter(std::forward<InputType>(i));
24109 const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict);
24110 return res ? result : basic_json(value_t::discarded);
24111 }
24112
24113 /*!
24114 @copydoc from_msgpack(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