MCPcopy Create free account
hub / github.com/MihailRis/voxelcore / object_from_binary

Function object_from_binary

src/coders/binary_json.cpp:132–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static std::unique_ptr<Map> object_from_binary(ByteReader& reader) {
133 auto obj = std::make_unique<Map>();
134 while (reader.peek() != BJSON_END) {
135 const char* key = reader.getCString();
136 obj->put(key, value_from_binary(reader));
137 }
138 reader.get();
139 return obj;
140}
141
142std::shared_ptr<Map> json::from_binary(const ubyte* src, size_t size) {
143 if (size < 2) {

Callers 1

value_from_binaryFunction · 0.85

Calls 5

value_from_binaryFunction · 0.85
getCStringMethod · 0.80
peekMethod · 0.45
putMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected