From ed520f672860b93bb820c1fb84cbb528596b730f Mon Sep 17 00:00:00 2001 From: 15950533375 Date: Tue, 17 Jun 2025 20:15:09 +0800 Subject: [PATCH] =?UTF-8?q?cjson=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: woohoa --- bundle.json | 2 +- frameworks/app_details_rdb/BUILD.gn | 4 +- frameworks/common/BUILD.gn | 4 +- frameworks/verifier/BUILD.gn | 4 +- frameworks/verifier/src/domain_json_util.cpp | 97 +++++++++---------- interfaces/inner_api/common/BUILD.gn | 4 +- services/BUILD.gn | 6 +- .../BUILD.gn | 3 +- .../appdomainverifymgrservice_fuzzer/BUILD.gn | 3 +- .../unittest/common/bean_parcel_test/BUILD.gn | 3 +- .../frameworks_common/bms_test/BUILD.gn | 3 +- .../mock_system_ability_ondemand_reason.cpp | 49 +++++++--- .../services/ability_filter_test/BUILD.gn | 3 +- .../BUILD.gn | 3 +- .../BUILD.gn | 3 +- test/unittest/verifier/BUILD.gn | 3 +- 16 files changed, 108 insertions(+), 86 deletions(-) diff --git a/bundle.json b/bundle.json index 9e41cef9..6d50ebfc 100644 --- a/bundle.json +++ b/bundle.json @@ -40,7 +40,7 @@ "netstack", "os_account", "ffrt", - "json", + "cJSON", "curl", "preferences", "access_token", diff --git a/frameworks/app_details_rdb/BUILD.gn b/frameworks/app_details_rdb/BUILD.gn index 857e2503..9213b32f 100644 --- a/frameworks/app_details_rdb/BUILD.gn +++ b/frameworks/app_details_rdb/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Huawei Device Co., Ltd. +# Copyright (C) 2024-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -49,6 +49,7 @@ ohos_shared_library("app_domain_verify_app_details_rdb") { "ability_runtime:ability_manager", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "curl:curl_shared", "eventhandler:libeventhandler", @@ -56,7 +57,6 @@ ohos_shared_library("app_domain_verify_app_details_rdb") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "netstack:http_client", "os_account:os_account_innerkits", "relational_store:native_rdb", diff --git a/frameworks/common/BUILD.gn b/frameworks/common/BUILD.gn index 012d7721..8682aab3 100644 --- a/frameworks/common/BUILD.gn +++ b/frameworks/common/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -62,13 +62,13 @@ ohos_shared_library("app_domain_verify_frameworks_common") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "ffrt:libffrt", "hicollie:libhicollie", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "memmgr:memmgrclient", "netstack:http_client", "os_account:os_account_innerkits", diff --git a/frameworks/verifier/BUILD.gn b/frameworks/verifier/BUILD.gn index f632449e..4f930acc 100644 --- a/frameworks/verifier/BUILD.gn +++ b/frameworks/verifier/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -63,6 +63,7 @@ ohos_shared_library("app_domain_verify_agent_verifier") { "ability_runtime:ability_manager", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "curl:curl_shared", "eventhandler:libeventhandler", @@ -70,7 +71,6 @@ ohos_shared_library("app_domain_verify_agent_verifier") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "netstack:http_client", "os_account:os_account_innerkits", "safwk:system_ability_fwk", diff --git a/frameworks/verifier/src/domain_json_util.cpp b/frameworks/verifier/src/domain_json_util.cpp index f3bdee61..1fa3372c 100644 --- a/frameworks/verifier/src/domain_json_util.cpp +++ b/frameworks/verifier/src/domain_json_util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * Copyright (C) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,64 +12,63 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "json.hpp" +#include "cJSON.h" #include "domain_json_util.h" #include "agent_constants.h" #include "app_domain_verify_hilog.h" namespace OHOS { namespace AppDomainVerify { -using json = nlohmann::json; bool JsonUtil::Parse(const std::string &assetJsonsStr, AssetJsonObj &assetJsonObj) { - if (!assetJsonsStr.empty()) { - json jsonObj; - try { - if (!json::accept(assetJsonsStr)) { - APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, "assetJsonsStr can not be accept."); - return false; - } - jsonObj = json::parse(assetJsonsStr); - } catch (json::parse_error &e) { - APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, "assetJsonsStr can not be parsed."); - return false; - } - if (jsonObj == nullptr || !jsonObj.is_object()) { - APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, - "assetLinksStr can not be parsed into obj."); - return false; - } - if (jsonObj.find(ApplinkingAssetKeys::APP_LINKING) == jsonObj.end() || - !jsonObj.at(ApplinkingAssetKeys::APP_LINKING).is_object()) { - APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, "can not parsed applinking into obj."); - return false; - } - auto applinkingObj = jsonObj.at(ApplinkingAssetKeys::APP_LINKING); - if (applinkingObj.find(ApplinkingAssetKeys::APPS) != applinkingObj.end() && - applinkingObj.at(ApplinkingAssetKeys::APPS).is_array()) { - auto appsArray = applinkingObj.at(ApplinkingAssetKeys::APPS); - for (size_t i = 0; i < appsArray.size(); i++) { - AppVerifyBaseInfo appVerifyBaseInfo; - auto arrayItem = appsArray[i]; - appVerifyBaseInfo.appIdentifier = arrayItem.find(ApplinkingAssetKeys::APP_IDENTIFIER) != - arrayItem.end() && - arrayItem.at(ApplinkingAssetKeys::APP_IDENTIFIER).is_string() ? - arrayItem.at(ApplinkingAssetKeys::APP_IDENTIFIER) : - ""; - appVerifyBaseInfo.bundleName = arrayItem.find(ApplinkingAssetKeys::BUNDLE_NAME) != arrayItem.end() && - arrayItem.at(ApplinkingAssetKeys::BUNDLE_NAME).is_string() ? - arrayItem.at(ApplinkingAssetKeys::BUNDLE_NAME) : - ""; - appVerifyBaseInfo.fingerprint = arrayItem.find(ApplinkingAssetKeys::FINGERPRINT) != arrayItem.end() && - arrayItem.at(ApplinkingAssetKeys::FINGERPRINT).is_string() ? - arrayItem.at(ApplinkingAssetKeys::FINGERPRINT) : - ""; - assetJsonObj.applinking.apps.emplace_back(appVerifyBaseInfo); - } - return true; - } + if (assetJsonsStr.empty()) { + return false; } + cJSON *jsonObj = cJSON_Parse(assetJsonsStr.c_str()); + if (jsonObj == nullptr) { + APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, "assetJsonsStr can not be parsed."); + return false; + } + if (!cJSON_IsObject(jsonObj)) { + APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, "assetLinksStr can not be parsed into obj."); + cJSON_Delete(jsonObj); + return false; + } + cJSON *applinkingObj = cJSON_GetObjectItemCaseSensitive(jsonObj, ApplinkingAssetKeys::APP_LINKING.c_str()); + if (applinkingObj == nullptr || !cJSON_IsObject(applinkingObj)) { + APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_AGENT_MODULE_SERVICE, "can not parsed applinking into obj."); + cJSON_Delete(jsonObj); + return false; + } + cJSON *appsArray = cJSON_GetObjectItemCaseSensitive(applinkingObj, ApplinkingAssetKeys::APPS.c_str()); + if (appsArray != nullptr && cJSON_IsArray(appsArray)) { + int arraySize = cJSON_GetArraySize(appsArray); + for (int i = 0; i < arraySize; i++) { + cJSON *arrayItem = cJSON_GetArrayItem(appsArray, i); + if (!cJSON_IsObject(arrayItem)) { + continue; + } + AppVerifyBaseInfo appVerifyBaseInfo; + cJSON *appIdentifier = cJSON_GetObjectItemCaseSensitive(arrayItem, + ApplinkingAssetKeys::APP_IDENTIFIER.c_str()); + if (appIdentifier != nullptr && cJSON_IsString(appIdentifier) && appIdentifier->valuestring != nullptr) { + appVerifyBaseInfo.appIdentifier = appIdentifier->valuestring; + } + cJSON *bundleName = cJSON_GetObjectItemCaseSensitive(arrayItem, ApplinkingAssetKeys::BUNDLE_NAME.c_str()); + if (bundleName != nullptr && cJSON_IsString(bundleName) && bundleName->valuestring != nullptr) { + appVerifyBaseInfo.bundleName = bundleName->valuestring; + } + cJSON *fingerprint = cJSON_GetObjectItemCaseSensitive(arrayItem, ApplinkingAssetKeys::FINGERPRINT.c_str()); + if (fingerprint != nullptr && cJSON_IsString(fingerprint) && fingerprint->valuestring != nullptr) { + appVerifyBaseInfo.fingerprint = fingerprint->valuestring; + } + assetJsonObj.applinking.apps.emplace_back(appVerifyBaseInfo); + } + cJSON_Delete(jsonObj); + return true; + } + cJSON_Delete(jsonObj); return false; } } diff --git a/interfaces/inner_api/common/BUILD.gn b/interfaces/inner_api/common/BUILD.gn index 06a74d41..c292fb4d 100644 --- a/interfaces/inner_api/common/BUILD.gn +++ b/interfaces/inner_api/common/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -53,11 +53,11 @@ ohos_shared_library("app_domain_verify_common") { external_deps = [ "ability_base:want", + "cJSON:cjson", "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/services/BUILD.gn b/services/BUILD.gn index 6d96e920..189aaeeb 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -92,13 +92,13 @@ ohos_shared_library("app_domain_verify_mgr_service") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "os_account:os_account_innerkits", "preferences:native_preferences", "relational_store:native_rdb", @@ -186,6 +186,7 @@ ohos_shared_library("app_domain_verify_agent_service") { "ability_base:zuri", "ability_runtime:ability_manager", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "curl:curl_shared", "eventhandler:libeventhandler", @@ -194,7 +195,6 @@ ohos_shared_library("app_domain_verify_agent_service") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "netmanager_base:net_conn_manager_if", "netstack:http_client", "os_account:os_account_innerkits", diff --git a/test/fuzztest/appdomainverifyagentservice_fuzzer/BUILD.gn b/test/fuzztest/appdomainverifyagentservice_fuzzer/BUILD.gn index c9d683ac..9551412d 100644 --- a/test/fuzztest/appdomainverifyagentservice_fuzzer/BUILD.gn +++ b/test/fuzztest/appdomainverifyagentservice_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -71,7 +71,6 @@ ohos_fuzztest("AppDomainVerifyAgentServiceFuzzTest") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "netmanager_base:net_conn_manager_if", "netstack:http_client", "os_account:os_account_innerkits", diff --git a/test/fuzztest/appdomainverifymgrservice_fuzzer/BUILD.gn b/test/fuzztest/appdomainverifymgrservice_fuzzer/BUILD.gn index e54a664f..0f90e233 100644 --- a/test/fuzztest/appdomainverifymgrservice_fuzzer/BUILD.gn +++ b/test/fuzztest/appdomainverifymgrservice_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -72,7 +72,6 @@ ohos_fuzztest("AppDomainVerifyMgrServiceFuzzTest") { "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", - "json:nlohmann_json_static", "netmanager_base:net_conn_manager_if", "netstack:http_client", "os_account:os_account_innerkits", diff --git a/test/unittest/common/bean_parcel_test/BUILD.gn b/test/unittest/common/bean_parcel_test/BUILD.gn index f5fa45dd..a1feda63 100644 --- a/test/unittest/common/bean_parcel_test/BUILD.gn +++ b/test/unittest/common/bean_parcel_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -59,7 +59,6 @@ ohos_unittest("app_domain_verify_bean_parcel_test") { "googletest:gtest_main", "hilog:libhilog", "hisysevent:libhisysevent", - "json:nlohmann_json_static", ] defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ] diff --git a/test/unittest/frameworks_common/bms_test/BUILD.gn b/test/unittest/frameworks_common/bms_test/BUILD.gn index f599e7e5..191b8f4d 100644 --- a/test/unittest/frameworks_common/bms_test/BUILD.gn +++ b/test/unittest/frameworks_common/bms_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -63,6 +63,7 @@ ohos_unittest("app_domain_verify_bms_test") { "access_token:libtokensetproc_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "eventhandler:libeventhandler", "ffrt:libffrt", diff --git a/test/unittest/mock/src/mock_system_ability_ondemand_reason.cpp b/test/unittest/mock/src/mock_system_ability_ondemand_reason.cpp index 3caa5152..7fcb5696 100644 --- a/test/unittest/mock/src/mock_system_ability_ondemand_reason.cpp +++ b/test/unittest/mock/src/mock_system_ability_ondemand_reason.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,6 +13,7 @@ * limitations under the License. */ +#include "cJSON.h" #include "parse_util.h" #include "system_ability_ondemand_reason.h" @@ -48,14 +49,21 @@ bool OnDemandReasonExtraData::Marshalling(Parcel& parcel) const if (!parcel.WriteString(data_)) { return false; } - nlohmann::json payload; - for (auto it = want_.begin(); it != want_.end(); ++it) { - payload[it->first] = it->second; - } - if (!parcel.WriteString(payload.dump())) { + cJSON *payload = cJSON_CreateObject(); + if (payload == nullptr) { return false; } - return true; + for (const auto& pair : want_) { + cJSON_AddStringToObject(payload, pair.first.c_str(), pair.second.c_str()); + } + char *jsonString = cJSON_PrintUnformatted(payload); + bool result = false; + if (jsonString != nullptr) { + result = parcel.WriteString(jsonString); + cJSON_free(jsonString); + } + cJSON_Delete(payload); + return result; } OnDemandReasonExtraData *OnDemandReasonExtraData::Unmarshalling(Parcel& parcel) @@ -69,14 +77,27 @@ OnDemandReasonExtraData *OnDemandReasonExtraData::Unmarshalling(Parcel& parcel) return nullptr; } std::map want; - nlohmann::json payload = ParseUtil::StringToJsonObj(parcel.ReadString()); - for (nlohmann::json::iterator it = payload.begin(); it != payload.end(); ++it) { - if (it.value().is_string()) { - want[it.key()] = it.value(); - } + std::string jsonStr; + if (!parcel.ReadString(jsonStr)) { + return nullptr; } - OnDemandReasonExtraData* extraData = new OnDemandReasonExtraData(code, data, want); - return extraData; + cJSON *payload = cJSON_Parse(jsonStr.c_str()); + if (payload == nullptr) { + return nullptr; + } + cJSON *child = payload->child; + while (child != nullptr) { + if (child->string == nullptr || *child->string == '\0') { + child = child->next; + continue; + } + if (cJSON_IsString(child) && child->valuestring != nullptr) { + want[child->string] = child->valuestring; + } + child = child->next; + } + cJSON_Delete(payload); + return new OnDemandReasonExtraData(code, data, want); } SystemAbilityOnDemandReason::SystemAbilityOnDemandReason(OnDemandReasonId reasonId, const std::string& reasonName, diff --git a/test/unittest/services/ability_filter_test/BUILD.gn b/test/unittest/services/ability_filter_test/BUILD.gn index 881a0b02..e3356982 100644 --- a/test/unittest/services/ability_filter_test/BUILD.gn +++ b/test/unittest/services/ability_filter_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Huawei Device Co., Ltd. +# Copyright (C) 2024-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -62,6 +62,7 @@ ohos_unittest("ability_filter_test") { "access_token:libtokensetproc_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "eventhandler:libeventhandler", "ffrt:libffrt", diff --git a/test/unittest/services/app_domain_verify_agent_service_test/BUILD.gn b/test/unittest/services/app_domain_verify_agent_service_test/BUILD.gn index fe9f0da8..065e7aa2 100644 --- a/test/unittest/services/app_domain_verify_agent_service_test/BUILD.gn +++ b/test/unittest/services/app_domain_verify_agent_service_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -58,6 +58,7 @@ ohos_unittest("app_domain_verify_agent_service_test") { "ability_base:zuri", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "eventhandler:libeventhandler", "ffrt:libffrt", diff --git a/test/unittest/services/app_domain_verify_mgr_service_test/BUILD.gn b/test/unittest/services/app_domain_verify_mgr_service_test/BUILD.gn index c85f9013..41169b77 100644 --- a/test/unittest/services/app_domain_verify_mgr_service_test/BUILD.gn +++ b/test/unittest/services/app_domain_verify_mgr_service_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -78,6 +78,7 @@ ohos_unittest("app_domain_verify_mgr_service_test") { "access_token:libtokensetproc_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "eventhandler:libeventhandler", "ffrt:libffrt", diff --git a/test/unittest/verifier/BUILD.gn b/test/unittest/verifier/BUILD.gn index 600775e3..3523b7c2 100644 --- a/test/unittest/verifier/BUILD.gn +++ b/test/unittest/verifier/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Huawei Device Co., Ltd. +# Copyright (C) 2023-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -62,6 +62,7 @@ ohos_unittest("app_domain_verify_agent_verifier_test") { "ability_base:zuri", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson", "c_utils:utils", "eventhandler:libeventhandler", "ffrt:libffrt",