add dv::value support to binary_json

This commit is contained in:
MihailRis
2024-09-16 22:53:27 +03:00
parent 271db9a6f1
commit 27c8307562
4 changed files with 210 additions and 1 deletions
+5
View File
@@ -3,6 +3,7 @@
#include <memory>
#include <vector>
#include "data/dv.hpp"
#include "data/dynamic_fwd.hpp"
namespace dynamic {
@@ -25,6 +26,10 @@ namespace json {
inline constexpr int BJSON_TYPE_NULL = 0xC;
inline constexpr int BJSON_TYPE_CDOCUMENT = 0x1F;
std::vector<ubyte> to_binaryDV(const dv::value& obj, bool compress = false);
dv::value from_binaryDV(const ubyte* src, size_t size);
std::vector<ubyte> to_binary(
const dynamic::Map* obj, bool compress = false
);