MCPcopy Create free account
hub / github.com/bcndev/bytecoin / load_entry

Function load_entry

src/seria/KVBinaryInputStream.cpp:142–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142JsonValue load_entry(size_t level, common::IInputStream &stream) {
143 if (level > 100)
144 throw std::runtime_error("KVBinaryInputStream depth too high");
145 uint8_t type;
146 stream.read(&type, 1);
147
148 if (type & BIN_KV_SERIALIZE_FLAG_ARRAY) {
149 type &= ~BIN_KV_SERIALIZE_FLAG_ARRAY;
150 return load_array(level + 1, stream, type);
151 }
152
153 return load_value(level, stream, type);
154}
155
156JsonValue load_array(size_t level, common::IInputStream &stream, uint8_t item_type) {
157 JsonValue arr(JsonValue::ARRAY);

Callers 1

load_objectFunction · 0.85

Calls 3

load_arrayFunction · 0.85
load_valueFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected