| 140 | } |
| 141 | |
| 142 | JsonValue 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 | |
| 156 | JsonValue load_array(size_t level, common::IInputStream &stream, uint8_t item_type) { |
| 157 | JsonValue arr(JsonValue::ARRAY); |
no test coverage detected