MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / get_msgpack_object

Method get_msgpack_object

examples/server/json.hpp:10867–10891  ·  view source on GitHub ↗

! @param[in] len the length of the object @return whether object creation completed */

Source from the content-addressed store, hash-verified

10865 @return whether object creation completed
10866 */
10867 bool get_msgpack_object(const std::size_t len)
10868 {
10869 if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))
10870 {
10871 return false;
10872 }
10873
10874 string_t key;
10875 for (std::size_t i = 0; i < len; ++i)
10876 {
10877 get();
10878 if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key)))
10879 {
10880 return false;
10881 }
10882
10883 if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))
10884 {
10885 return false;
10886 }
10887 key.clear();
10888 }
10889
10890 return sax->end_object();
10891 }
10892
10893 ////////////
10894 // UBJSON //

Callers

nothing calls this directly

Calls 4

getFunction · 0.85
start_objectMethod · 0.45
keyMethod · 0.45
end_objectMethod · 0.45

Tested by

no test coverage detected