MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / get_ubjson_array

Method get_ubjson_array

external/json/json.hpp:7994–8051  ·  view source on GitHub ↗

! @return whether array creation completed */

Source from the content-addressed store, hash-verified

7992 @return whether array creation completed
7993 */
7994 bool get_ubjson_array()
7995 {
7996 std::pair<std::size_t, int> size_and_type;
7997 if (JSON_UNLIKELY(not get_ubjson_size_type(size_and_type)))
7998 {
7999 return false;
8000 }
8001
8002 if (size_and_type.first != string_t::npos)
8003 {
8004 if (JSON_UNLIKELY(not sax->start_array(size_and_type.first)))
8005 {
8006 return false;
8007 }
8008
8009 if (size_and_type.second != 0)
8010 {
8011 if (size_and_type.second != 'N')
8012 {
8013 for (std::size_t i = 0; i < size_and_type.first; ++i)
8014 {
8015 if (JSON_UNLIKELY(not get_ubjson_value(size_and_type.second)))
8016 {
8017 return false;
8018 }
8019 }
8020 }
8021 }
8022 else
8023 {
8024 for (std::size_t i = 0; i < size_and_type.first; ++i)
8025 {
8026 if (JSON_UNLIKELY(not parse_ubjson_internal()))
8027 {
8028 return false;
8029 }
8030 }
8031 }
8032 }
8033 else
8034 {
8035 if (JSON_UNLIKELY(not sax->start_array(std::size_t(-1))))
8036 {
8037 return false;
8038 }
8039
8040 while (current != ']')
8041 {
8042 if (JSON_UNLIKELY(not parse_ubjson_internal(false)))
8043 {
8044 return false;
8045 }
8046 get_ignore_noop();
8047 }
8048 }
8049
8050 return sax->end_array();
8051 }

Callers

nothing calls this directly

Calls 2

start_arrayMethod · 0.45
end_arrayMethod · 0.45

Tested by

no test coverage detected