MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / get_msgpack_object

Method get_msgpack_object

lesson6-Segmentation/json.hpp:9362–9386  ·  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

9360 @return whether object creation completed
9361 */
9362 bool get_msgpack_object(const std::size_t len)
9363 {
9364 if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))
9365 {
9366 return false;
9367 }
9368
9369 string_t key;
9370 for (std::size_t i = 0; i < len; ++i)
9371 {
9372 get();
9373 if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key)))
9374 {
9375 return false;
9376 }
9377
9378 if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))
9379 {
9380 return false;
9381 }
9382 key.clear();
9383 }
9384
9385 return sax->end_object();
9386 }
9387
9388 ////////////
9389 // UBJSON //

Callers

nothing calls this directly

Calls 5

getFunction · 0.85
clearMethod · 0.80
start_objectMethod · 0.45
keyMethod · 0.45
end_objectMethod · 0.45

Tested by

no test coverage detected