chore: consolidate json code under core/json (#2609)

Fix linker dependencies - now dfly_core depends on jsonpath.
jsonpath does not depend on CompactObject anymore.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-02-18 11:22:34 +02:00 committed by GitHub
parent 1ba59e9179
commit d802a2181a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 36 additions and 39 deletions

View file

@ -26,12 +26,11 @@ extern "C" {
#include <zstd.h>
#include <cstring>
#include <jsoncons/json.hpp>
#include "base/endian.h"
#include "base/flags.h"
#include "base/logging.h"
#include "core/json_object.h"
#include "core/json/json_object.h"
#include "core/sorted_map.h"
#include "core/string_map.h"
#include "core/string_set.h"
@ -1009,7 +1008,7 @@ void RdbLoaderBase::OpaqueObjLoader::HandleBlob(string_view blob) {
std::memcpy(lp, src_lp, bytes);
pv_->InitRobj(OBJ_ZSET, OBJ_ENCODING_LISTPACK, lp);
} else if (rdb_type_ == RDB_TYPE_JSON) {
auto json = JsonFromString(blob);
auto json = JsonFromString(blob, CompactObj::memory_resource());
if (!json) {
ec_ = RdbError(errc::bad_json_string);
}