mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add json BJSON_TYPE_BYTES support
This commit is contained in:
parent
6f4a7db910
commit
f8fadf8b74
7 changed files with 72 additions and 8 deletions
|
|
@ -63,6 +63,10 @@ void stringifyValue(
|
|||
stringifyObj(map->get(), ss, indent, indentstr, nice);
|
||||
} else if (auto listptr = std::get_if<List_sptr>(&value)) {
|
||||
stringifyArr(listptr->get(), ss, indent, indentstr, nice);
|
||||
} else if (auto bytesptr = std::get_if<ByteBuffer_sptr>(&value)) {
|
||||
auto bytes = bytesptr->get();
|
||||
ss << "\"" << util::base64_encode(bytes->data(), bytes->size());
|
||||
ss << "\"";
|
||||
} else if (auto flag = std::get_if<bool>(&value)) {
|
||||
ss << (*flag ? "true" : "false");
|
||||
} else if (auto num = std::get_if<number_t>(&value)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue