MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / decode_map

Method decode_map

src/dpp/etf.cpp:357–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357json etf_parser::decode_map() {
358 const uint32_t length = read_32_bits();
359 json map;
360 for(uint32_t i = 0; i < length; ++i) {
361 auto key = inner_parse();
362 if (key.is_number()) {
363 map.emplace(std::to_string(key.get<uint64_t>()), inner_parse());
364 } else {
365 map.emplace(key.get<std::string>(), inner_parse());
366 }
367 }
368 return map;
369}
370
371json etf_parser::decode_float() {
372

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.85
emplaceMethod · 0.80

Tested by

no test coverage detected