/base/security/security_guard/services/config_manager/src/ |
H A D | model_cfg_marshalling.cpp | 25 void from_json(const nlohmann::json &jsonObj, AppDetectionCfg &config)
in from_json() argument 27 if (jsonObj.find("detectionCategory") == jsonObj.end()) {
in from_json() 31 if (!jsonObj.at("detectionCategory").is_string()) {
in from_json() 35 config.detectionCategory = jsonObj.at("detectionCategory").get<std::string>();
in from_json() 38 void from_json(const nlohmann::json &jsonObj, Field &field)
in from_json() argument 40 if (jsonObj.find("fieldName") == jsonObj.end() || jsonObj.find("fieldType") == jsonObj in from_json() 55 from_json(const nlohmann::json &jsonObj, Rule &rule) from_json() argument 72 from_json(const nlohmann::json &jsonObj, BuildInDetectionCfg &config) from_json() argument 90 to_json(json &jsonObj, const ModelCfg &modelCfg) to_json() argument 118 from_json(const json &jsonObj, ModelCfg &modelCfg) from_json() argument 159 to_json(json &jsonObj, const EventCfg &eventCfg) to_json() argument 177 from_json(const json &jsonObj, EventCfg &eventCfg) from_json() argument 200 to_json(json &jsonObj, const DataMgrCfgSt &dataMgrCfg) to_json() argument 210 from_json(const json &jsonObj, DataMgrCfgSt &dataMgrCfg) from_json() argument 218 to_json(json &jsonObj, const SecEvent &eventDataSt) to_json() argument 230 to_json(json &jsonObj, const EventContentSt &eventContentSt) to_json() argument 239 from_json(const json &jsonObj, EventContentSt &eventContentSt) from_json() argument [all...] |
H A D | event_config.cpp | 67 nlohmann::json jsonObj = nlohmann::json::parse(stream_, nullptr, false); in Parse() local 70 if (jsonObj.is_discarded()) { in Parse() 76 bool success = EventConfig::ParseEventConfig(configs, jsonObj); in Parse() 93 nlohmann::json jsonObj = nlohmann::json::parse(stream_, nullptr, false); in Update() local 96 if (jsonObj.is_discarded()) { in Update() 102 bool success = EventConfig::ParseEventConfig(configs, jsonObj); in Update() 119 bool EventConfig::ParseEventConfig(std::vector<EventCfg> &configs, nlohmann::json &jsonObj) in ParseEventConfig() argument 121 bool success = JsonCfg::Unmarshal<EventCfg>(configs, jsonObj, EVENT_CFG_KEY); in ParseEventConfig()
|
H A D | model_config.cpp | 61 nlohmann::json jsonObj = nlohmann::json::parse(stream_, nullptr, false); in Parse() local 64 if (jsonObj.is_discarded()) { in Parse() 70 bool success = ParseModelConfig(configs, jsonObj); in Parse() 87 nlohmann::json jsonObj = nlohmann::json::parse(stream_, nullptr, false); in Update() local 90 if (jsonObj.is_discarded()) { in Update() 96 bool success = ParseModelConfig(configs, jsonObj); in Update() 113 bool ModelConfig::ParseModelConfig(std::vector<ModelCfg> &configs, nlohmann::json &jsonObj) in ParseModelConfig() argument 115 return JsonCfg::Unmarshal<ModelCfg>(configs, jsonObj, MODEL_CFG_KEY); in ParseModelConfig()
|
/base/security/device_auth/common_lib/impl/src/ |
H A D | json_utils.c | 69 CJson *DuplicateJson(const CJson *jsonObj)
in DuplicateJson() argument 71 if (jsonObj == NULL) {
in DuplicateJson() 74 return cJSON_Duplicate(jsonObj, RECURSE_FLAG_TRUE);
in DuplicateJson() 77 void FreeJson(CJson *jsonObj)
in FreeJson() argument 79 cJSON_Delete(jsonObj);
in FreeJson() 82 void DeleteItemFromJson(CJson *jsonObj, const char *key)
in DeleteItemFromJson() argument 84 if (jsonObj == NULL || key == NULL) {
in DeleteItemFromJson() 87 cJSON_DeleteItemFromObjectCaseSensitive(jsonObj, key);
in DeleteItemFromJson() 90 void DeleteAllItemExceptOne(CJson *jsonObj, const char *key)
in DeleteAllItemExceptOne() argument 92 if (jsonObj in DeleteAllItemExceptOne() 107 DeleteAllItem(CJson *jsonObj) DeleteAllItem() argument 122 DetachItemFromJson(CJson *jsonObj, const char *key) DetachItemFromJson() argument 131 PackJsonToString(const CJson *jsonObj) PackJsonToString() argument 146 GetItemNum(const CJson *jsonObj) GetItemNum() argument 162 GetObjFromJson(const CJson *jsonObj, const char *key) GetObjFromJson() argument 195 GetStringFromJson(const CJson *jsonObj, const char *key) GetStringFromJson() argument 220 GetByteLenFromJson(const CJson *jsonObj, const char *key, uint32_t *byteLen) GetByteLenFromJson() argument 234 GetByteFromJson(const CJson *jsonObj, const char *key, uint8_t *byte, uint32_t len) GetByteFromJson() argument 250 GetIntFromJson(const CJson *jsonObj, const char *key, int32_t *value) GetIntFromJson() argument 276 GetUnsignedIntFromJson(const CJson *jsonObj, const char *key, uint32_t *value) GetUnsignedIntFromJson() argument 308 GetInt64FromJson(const CJson *jsonObj, const char *key, int64_t *value) GetInt64FromJson() argument 318 GetBoolFromJson(const CJson *jsonObj, const char *key, bool *value) GetBoolFromJson() argument 349 AddObjToJson(CJson *jsonObj, const char *key, const CJson *childObj) AddObjToJson() argument 417 AddStringToJson(CJson *jsonObj, const char *key, const char *value) AddStringToJson() argument 442 AddByteToJson(CJson *jsonObj, const char *key, const uint8_t *byte, uint32_t len) AddByteToJson() argument 469 AddBoolToJson(CJson *jsonObj, const char *key, bool value) AddBoolToJson() argument 494 AddIntToJson(CJson *jsonObj, const char *key, int value) AddIntToJson() argument 519 AddInt64StringToJson(CJson *jsonObj, const char *key, int64_t value) AddInt64StringToJson() argument 531 AddStringArrayToJson(CJson *jsonObj, const char *key, const char * const *stringArray, uint32_t arrayLen) AddStringArrayToJson() argument 548 ClearSensitiveStringInJson(CJson *jsonObj, const char *key) ClearSensitiveStringInJson() argument [all...] |
/base/security/device_auth/test/unittest/deviceauth/source/ |
H A D | json_utils_mock.c | 98 CJson *DuplicateJson(const CJson *jsonObj) in DuplicateJson() argument 100 if (jsonObj == NULL) { in DuplicateJson() 106 return cJSON_Duplicate(jsonObj, RECURSE_FLAG_TRUE); in DuplicateJson() 109 void FreeJson(CJson *jsonObj) in FreeJson() argument 111 cJSON_Delete(jsonObj); in FreeJson() 114 void DeleteItemFromJson(CJson *jsonObj, const char *key) in DeleteItemFromJson() argument 116 if (jsonObj == NULL || key == NULL) { in DeleteItemFromJson() 119 cJSON_DeleteItemFromObjectCaseSensitive(jsonObj, key); in DeleteItemFromJson() 122 void DeleteAllItemExceptOne(CJson *jsonObj, const char *key) in DeleteAllItemExceptOne() argument 124 if (jsonObj in DeleteAllItemExceptOne() 139 DeleteAllItem(CJson *jsonObj) DeleteAllItem() argument 154 DetachItemFromJson(CJson *jsonObj, const char *key) DetachItemFromJson() argument 163 PackJsonToString(const CJson *jsonObj) PackJsonToString() argument 179 GetItemNum(const CJson *jsonObj) GetItemNum() argument 195 GetObjFromJson(const CJson *jsonObj, const char *key) GetObjFromJson() argument 228 GetStringFromJson(const CJson *jsonObj, const char *key) GetStringFromJson() argument 253 GetByteLenFromJson(const CJson *jsonObj, const char *key, uint32_t *byteLen) GetByteLenFromJson() argument 267 GetByteFromJson(const CJson *jsonObj, const char *key, uint8_t *byte, uint32_t len) GetByteFromJson() argument 283 GetIntFromJson(const CJson *jsonObj, const char *key, int32_t *value) GetIntFromJson() argument 309 GetUnsignedIntFromJson(const CJson *jsonObj, const char *key, uint32_t *value) GetUnsignedIntFromJson() argument 341 GetInt64FromJson(const CJson *jsonObj, const char *key, int64_t *value) GetInt64FromJson() argument 351 GetBoolFromJson(const CJson *jsonObj, const char *key, bool *value) GetBoolFromJson() argument 382 AddObjToJson(CJson *jsonObj, const char *key, const CJson *childObj) AddObjToJson() argument 450 AddStringToJson(CJson *jsonObj, const char *key, const char *value) AddStringToJson() argument 475 AddByteToJson(CJson *jsonObj, const char *key, const uint8_t *byte, uint32_t len) AddByteToJson() argument 502 AddBoolToJson(CJson *jsonObj, const char *key, bool value) AddBoolToJson() argument 527 AddIntToJson(CJson *jsonObj, const char *key, int value) AddIntToJson() argument 552 AddInt64StringToJson(CJson *jsonObj, const char *key, int64_t value) AddInt64StringToJson() argument 564 AddStringArrayToJson(CJson *jsonObj, const char *key, const char * const *stringArray, uint32_t arrayLen) AddStringArrayToJson() argument 581 ClearSensitiveStringInJson(CJson *jsonObj, const char *key) ClearSensitiveStringInJson() argument [all...] |
/base/security/device_auth/common_lib/interfaces/ |
H A D | json_utils.h | 38 CJson *DuplicateJson(const CJson *jsonObj);
39 void FreeJson(CJson *jsonObj);
41 void DeleteItemFromJson(CJson *jsonObj, const char *key);
42 void DeleteAllItemExceptOne(CJson *jsonObj, const char *key);
43 void DeleteAllItem(CJson *jsonObj);
44 CJson *DetachItemFromJson(CJson *jsonObj, const char *key);
47 char *PackJsonToString(const CJson *jsonObj);
50 int GetItemNum(const CJson *jsonObj);
53 * It refers to the parent object(param--jsonObj)'s memory.
54 * It will be recycled along with jsonObj whe [all...] |
/base/security/security_guard/frameworks/common/json/src/ |
H A D | json_cfg.cpp | 19 bool JsonCfg::Unmarshal(uint64_t &data, nlohmann::json jsonObj, std::string key) in Unmarshal() argument 21 JSON_CHECK_HELPER_RETURN_IF_FAILED(jsonObj, key, number, false); in Unmarshal() 22 data = jsonObj.at(key).get<uint64_t>(); in Unmarshal() 26 bool JsonCfg::Unmarshal(int64_t &data, nlohmann::json jsonObj, std::string key) in Unmarshal() argument 28 JSON_CHECK_HELPER_RETURN_IF_FAILED(jsonObj, key, number, false); in Unmarshal() 29 data = jsonObj.at(key).get<int64_t>(); in Unmarshal() 33 bool JsonCfg::Unmarshal(uint32_t &data, nlohmann::json jsonObj, std::string key) in Unmarshal() argument 35 JSON_CHECK_HELPER_RETURN_IF_FAILED(jsonObj, key, number, false); in Unmarshal() 36 data = jsonObj.at(key).get<uint32_t>(); in Unmarshal() 40 bool JsonCfg::Unmarshal(int32_t &data, nlohmann::json jsonObj, st argument 47 Unmarshal(std::string &data, nlohmann::json jsonObj, std::string key) Unmarshal() argument 54 Unmarshal(std::vector<int32_t> &data, nlohmann::json jsonObj, std::string key) Unmarshal() argument 67 Unmarshal(std::vector<std::string> &data, nlohmann::json jsonObj, std::string key) Unmarshal() argument 80 Unmarshal(std::vector<int64_t> &data, nlohmann::json jsonObj, std::string key) Unmarshal() argument [all...] |
/base/security/security_guard/test/unittest/config_manager/src/ |
H A D | security_guard_config_manager_test.cpp | 309 nlohmann::json jsonObj; in HWTEST_F() local 311 to_json(jsonObj, modelCfg); in HWTEST_F() 313 to_json(jsonObj, dataMgrCfg); in HWTEST_F() 314 from_json(jsonObj, dataMgrCfg); in HWTEST_F() 316 to_json(jsonObj, eventDataSt); in HWTEST_F() 318 to_json(jsonObj, eventContentSt); in HWTEST_F() 319 from_json(jsonObj, eventContentSt); in HWTEST_F() 321 jsonObj["modelId"] = "xxx"; in HWTEST_F() 322 from_json(jsonObj, modelCfg); in HWTEST_F() 323 jsonObj["eventI in HWTEST_F() 345 nlohmann::json jsonObj; HWTEST_F() local 352 nlohmann::json jsonObj; HWTEST_F() local 360 nlohmann::json jsonObj; HWTEST_F() local 368 nlohmann::json jsonObj; HWTEST_F() local 377 nlohmann::json jsonObj; HWTEST_F() local 387 nlohmann::json jsonObj; HWTEST_F() local 398 nlohmann::json jsonObj; HWTEST_F() local 410 nlohmann::json jsonObj; HWTEST_F() local 422 nlohmann::json jsonObj; HWTEST_F() local 434 nlohmann::json jsonObj; HWTEST_F() local 446 nlohmann::json jsonObj; HWTEST_F() local 455 nlohmann::json jsonObj; HWTEST_F() local 465 nlohmann::json jsonObj; HWTEST_F() local 476 nlohmann::json jsonObj; HWTEST_F() local 488 nlohmann::json jsonObj; HWTEST_F() local 500 nlohmann::json jsonObj; HWTEST_F() local 512 nlohmann::json jsonObj; HWTEST_F() local 528 nlohmann::json jsonObj; HWTEST_F() local 544 nlohmann::json jsonObj; HWTEST_F() local 554 nlohmann::json jsonObj; HWTEST_F() local 565 nlohmann::json jsonObj; HWTEST_F() local 577 nlohmann::json jsonObj; HWTEST_F() local 590 nlohmann::json jsonObj; HWTEST_F() local 604 nlohmann::json jsonObj; HWTEST_F() local 626 nlohmann::json jsonObj; HWTEST_F() local 648 nlohmann::json jsonObj; HWTEST_F() local 670 nlohmann::json jsonObj; HWTEST_F() local [all...] |
/base/security/security_guard/test/unittest/config_manager/include/ |
H A D | model_cfg_marshalling.h | 27 void from_json(const nlohmann::json &jsonObj, AppDetectionCfg &config); 28 void from_json(const nlohmann::json &jsonObj, Field &field); 29 void from_json(const nlohmann::json &jsonObj, Rule &rule); 30 void from_json(const nlohmann::json &jsonObj, BuildInDetectionCfg &config); 31 void to_json(nlohmann::json &jsonObj, const ModelCfg &modelCfg); 32 void from_json(const nlohmann::json &jsonObj, ModelCfg &modelCfg); 33 void to_json(nlohmann::json &jsonObj, const EventCfg &eventCfg); 34 void from_json(const nlohmann::json &jsonObj, EventCfg &eventCfg); 35 void to_json(nlohmann::json &jsonObj, const DataMgrCfgSt &dataMgrCfg); 36 void from_json(const nlohmann::json &jsonObj, DataMgrCfgS [all...] |
/base/security/security_guard/services/config_manager/include/ |
H A D | model_cfg_marshalling.h | 27 void from_json(const nlohmann::json &jsonObj, AppDetectionCfg &config);
28 void from_json(const nlohmann::json &jsonObj, Field &field);
29 void from_json(const nlohmann::json &jsonObj, Rule &rule);
30 void from_json(const nlohmann::json &jsonObj, BuildInDetectionCfg &config);
31 void to_json(nlohmann::json &jsonObj, const ModelCfg &modelCfg);
32 void from_json(const nlohmann::json &jsonObj, ModelCfg &modelCfg);
33 void to_json(nlohmann::json &jsonObj, const EventCfg &eventCfg);
34 void from_json(const nlohmann::json &jsonObj, EventCfg &eventCfg);
35 void to_json(nlohmann::json &jsonObj, const DataMgrCfgSt &dataMgrCfg);
36 void from_json(const nlohmann::json &jsonObj, DataMgrCfgS [all...] |
/base/security/dlp_permission_service/interfaces/inner_api/dlp_permission/src/ |
H A D | dlp_permission_public_interface.cpp | 32 static bool checkParams(GenerateInfoParams& params, nlohmann::json jsonObj, std::string versionKey, std::string infoKey) in checkParams() argument 34 auto iter = jsonObj.find(versionKey); in checkParams() 35 if (iter == jsonObj.end() || !iter->is_number_integer()) { in checkParams() 38 iter = jsonObj.find(infoKey); in checkParams() 39 if (iter != jsonObj.end() && iter->is_array() && in checkParams() 78 auto jsonObj = nlohmann::json::parse(generalInfo, nullptr, false); in ParseDlpGeneralInfo() local 79 if (jsonObj.is_discarded() || (!jsonObj.is_object())) { in ParseDlpGeneralInfo() 82 if (checkParams(params, jsonObj, DLP_VERSION, DLP_EXTRA_INFO)) { in ParseDlpGeneralInfo() 83 params.version = jsonObj in ParseDlpGeneralInfo() [all...] |
/base/security/security_guard/frameworks/common/json/include/ |
H A D | json_cfg.h | 34 static bool Unmarshal(uint64_t &data, nlohmann::json jsonObj, std::string key);
35 static bool Unmarshal(int64_t &data, nlohmann::json jsonObj, std::string key);
36 static bool Unmarshal(uint32_t &data, nlohmann::json jsonObj, std::string key);
37 static bool Unmarshal(int32_t &data, nlohmann::json jsonObj, std::string key);
38 static bool Unmarshal(std::string &data, nlohmann::json jsonObj, std::string key);
39 static bool Unmarshal(std::vector<int32_t> &data, nlohmann::json jsonObj, std::string key);
40 static bool Unmarshal(std::vector<std::string> &data, nlohmann::json jsonObj, std::string key);
41 static bool Unmarshal(std::vector<int64_t> &data, nlohmann::json jsonObj, std::string key);
43 static bool Unmarshal(T &data, nlohmann::json jsonObj, std::string key)
in Unmarshal() argument 45 JSON_CHECK_HELPER_RETURN_IF_FAILED(jsonObj, ke in Unmarshal() 51 Unmarshal(std::vector<T> &data, nlohmann::json jsonObj, std::string key) Unmarshal() argument [all...] |
/base/notification/common_event_service/test/systemtest/common/resource/ |
H A D | testConfigParser.h | 53 nlohmann::json jsonObj; in ParseFromFile4StressTest() local 54 jf >> jsonObj; in ParseFromFile4StressTest() local 56 if (jsonObj.is_null() || !jsonObj.is_object()) { in ParseFromFile4StressTest() 60 const auto &jsonObjEnd = jsonObj.end(); in ParseFromFile4StressTest() 61 if (jsonObj.find(STRESS_TEST_AMS_KEY) != jsonObjEnd) { in ParseFromFile4StressTest() 62 jsonObj.at(STRESS_TEST_AMS_KEY).get_to(stlevel.AMSLevel); in ParseFromFile4StressTest() 68 if (jsonObj.find(STRESS_TEST_BMS_KEY) != jsonObjEnd) { in ParseFromFile4StressTest() 69 jsonObj.at(STRESS_TEST_BMS_KEY).get_to(stlevel.BMSLevel); in ParseFromFile4StressTest() 75 if (jsonObj in ParseFromFile4StressTest() [all...] |
/base/security/security_guard/test/unittest/risk_classify/include/ |
H A D | model_cfg_marshalling.h | 55 void from_json(const nlohmann::json &jsonObj, Field &field) {}; 56 void from_json(const nlohmann::json &jsonObj, Rule &rule) {}; 57 void from_json(const nlohmann::json &jsonObj, BuildInDetectionCfg &config) {}; 58 void to_json(nlohmann::json &jsonObj, const ModelCfg &modelCfg) {}; 59 void from_json(const nlohmann::json &jsonObj, ModelCfg &modelCfg) {}; 60 void to_json(nlohmann::json &jsonObj, const EventCfg &eventCfg) {}; 61 void from_json(const nlohmann::json &jsonObj, EventCfg &eventCfg) {}; 62 void to_json(nlohmann::json &jsonObj, const DataMgrCfgSt &dataMgrCfg) {}; 63 void from_json(const nlohmann::json &jsonObj, DataMgrCfgSt &dataMgrCfg) {}; 64 void to_json(nlohmann::json &jsonObj, cons [all...] |
/base/security/security_guard/test/unittest/data_collect/sa/ |
H A D | model_cfg_marshalling.h | 54 void from_json(const nlohmann::json &jsonObj, Field &field) {}; 55 void from_json(const nlohmann::json &jsonObj, Rule &rule) {}; 56 void from_json(const nlohmann::json &jsonObj, BuildInDetectionCfg &config) {}; 57 void to_json(nlohmann::json &jsonObj, const ModelCfg &modelCfg) {}; 58 void from_json(const nlohmann::json &jsonObj, ModelCfg &modelCfg) {}; 59 void to_json(nlohmann::json &jsonObj, const EventCfg &eventCfg) {}; 60 void from_json(const nlohmann::json &jsonObj, EventCfg &eventCfg) {}; 61 void to_json(nlohmann::json &jsonObj, const DataMgrCfgSt &dataMgrCfg) {}; 62 void from_json(const nlohmann::json &jsonObj, DataMgrCfgSt &dataMgrCfg) {}; 63 void to_json(nlohmann::json &jsonObj, cons [all...] |
/base/security/security_guard/services/data_collect/sa/ |
H A D | data_format.cpp | 38 nlohmann::json jsonObj = nlohmann::json::parse(content, nullptr, false);
in CheckRiskContent() local 39 if (jsonObj.is_discarded()) {
in CheckRiskContent() 48 nlohmann::json jsonObj = nlohmann::json::parse(conditions, nullptr, false);
in ParseConditions() local 49 if (jsonObj.is_discarded()) {
in ParseConditions() 54 auto iter = jsonObj.find(EVENT_CFG_EVENT_ID_KEY);
in ParseConditions() 55 if (iter != jsonObj.end() && (*iter).is_array()) {
in ParseConditions() 74 iter = jsonObj.find("beginTime");
in ParseConditions() 75 if (iter != jsonObj.end() && (*iter).is_string()) {
in ParseConditions() 79 iter = jsonObj.find("endTime");
in ParseConditions() 80 if (iter != jsonObj in ParseConditions() [all...] |
/base/update/updateservice/foundations/model/include/ |
H A D | business_error.h | 51 friend void to_json(nlohmann::json &jsonObj, const BusinessError &businessError) in to_json() 53 jsonObj["message"] = businessError.message; in to_json() 54 jsonObj["errorNum"] = businessError.errorNum; in to_json() 55 jsonObj["data"] = businessError.data; in to_json() 58 friend void from_json(const nlohmann::json &jsonObj, BusinessError &businessError) in from_json() 60 JsonUtils::GetValueAndSetTo(jsonObj, "message", businessError.message); in from_json() 61 JsonUtils::GetValueAndSetTo(jsonObj, "data", businessError.data); in from_json() 63 JsonUtils::GetValueAndSetTo(jsonObj, "errorNum", errorNumber); in from_json()
|
H A D | error_message.h | 32 friend void to_json(nlohmann::json &jsonObj, const ErrorMessage &message) in to_json() 34 jsonObj["errorCode"] = message.errorCode; in to_json() 35 jsonObj["errorMessage"] = message.errorMessage; in to_json() 38 friend void from_json(const nlohmann::json &jsonObj, ErrorMessage &message) in from_json() 40 JsonUtils::GetValueAndSetTo(jsonObj, "errorCode", message.errorCode); in from_json() 41 JsonUtils::GetValueAndSetTo(jsonObj, "errorMessage", message.errorMessage); in from_json()
|
/base/security/security_guard/services/security_collector/src/ |
H A D | collector_cfg_marshalling.cpp | 23 void to_json(json &jsonObj, const ModuleCfgSt &moduleCfg) in to_json() argument 28 jsonObj = json { in to_json() 38 void from_json(const json &jsonObj, ModuleCfgSt &moduleCfg) in from_json() argument 41 SecurityGuard::JsonCfg::Unmarshal(eventList, jsonObj, EVENT_ID); in from_json() 49 SecurityGuard::JsonCfg::Unmarshal(moduleCfg.moduleId, jsonObj, MODULE_ID); in from_json() 51 SecurityGuard::JsonCfg::Unmarshal(moduleCfg.moduleName, jsonObj, MODULE_NAME); in from_json() 52 SecurityGuard::JsonCfg::Unmarshal(moduleCfg.modulePath, jsonObj, MODULE_PATH); in from_json() 53 SecurityGuard::JsonCfg::Unmarshal(moduleCfg.version, jsonObj, MODULE_VERSION); in from_json() 54 SecurityGuard::JsonCfg::Unmarshal(moduleCfg.collectorType, jsonObj, MODULE_COLLECTOR_TYPE); in from_json()
|
/base/security/dlp_permission_service/frameworks/test/mock/ |
H A D | dlp_permission_kit.cpp | 34 unordered_json jsonObj; in GenerateDlpCertificate() local 35 int32_t res = DlpPermissionSerializer::GetInstance().SerializeDlpPermission(policy, jsonObj); in GenerateDlpCertificate() 39 std::string certStr = jsonObj.dump(); in GenerateDlpCertificate() 48 auto jsonObj = nlohmann::json::parse(encJsonStr, nullptr, false); in ParseDlpCertificate() local 49 if (jsonObj.is_discarded() || (!jsonObj.is_object())) { in ParseDlpCertificate() 54 return DlpPermissionSerializer::GetInstance().DeserializeDlpPermission(jsonObj, policy); in ParseDlpCertificate()
|
/base/security/appverify/interfaces/innerkits/appverify_lite/src/ |
H A D | app_provision.c | 43 cJSON *jsonObj = cJSON_GetObjectItem(root, tag); in GetStringTag() local 44 if ((jsonObj == NULL) || (jsonObj->valuestring == NULL)) { in GetStringTag() 48 int32_t objLen = strlen(jsonObj->valuestring); in GetStringTag() 58 errno_t ret = strcpy_s(value, objLen + 1, jsonObj->valuestring); in GetStringTag() 83 cJSON *jsonObj = cJSON_GetObjectItem(root, tag); in GetStringArrayTag() local 84 if (jsonObj == NULL) { in GetStringArrayTag() 88 int32_t num = cJSON_GetArraySize(jsonObj); in GetStringArrayTag() 103 cJSON *item = cJSON_GetArrayItem(jsonObj, i); in GetStringArrayTag() 130 cJSON *jsonObj in GetProfValidity() local 154 cJSON *jsonObj = cJSON_GetObjectItem(root, "bundle-info"); GetProfBundleInfo() local 190 cJSON *jsonObj = cJSON_GetObjectItem(root, "permissions"); GetProfPermission() local 202 cJSON *jsonObj = cJSON_GetObjectItem(root, "debug-info"); GetProfDebugInfo() local 298 cJSON *jsonObj = cJSON_GetObjectItem(root, "version-code"); ParseProfile() local [all...] |
/base/account/os_account/test/systemtest/common/resource/fuzzTest/include/ |
H A D | fuzz_config_parser.h | 49 nlohmann::json jsonObj = nlohmann::json::parse(fin, nullptr, false); in ParseFromFile4FuzzTest() local 51 if (jsonObj.is_discarded() || !jsonObj.is_structured()) { in ParseFromFile4FuzzTest() 56 for (auto it = jsonObj.begin(); it != jsonObj.end(); ++it) { in ParseFromFile4FuzzTest()
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/ |
H A D | das_version_util.c | 126 int32_t AddSingleVersionToJson(CJson *jsonObj, const VersionStruct *version) in AddSingleVersionToJson() argument 128 CHECK_PTR_RETURN_ERROR_CODE(jsonObj, "jsonObj"); in AddSingleVersionToJson() 138 CJson *sendToPeer = GetObjFromJson(jsonObj, FIELD_SEND_TO_PEER); in AddSingleVersionToJson() 150 int32_t GetSingleVersionFromJson(const CJson* jsonObj, VersionStruct *version) in GetSingleVersionFromJson() argument 152 CHECK_PTR_RETURN_ERROR_CODE(jsonObj, "jsonObj"); in GetSingleVersionFromJson() 155 const char *versionStr = GetStringFromJson(jsonObj, FIELD_GROUP_AND_MODULE_VERSION); in GetSingleVersionFromJson() 180 int32_t GetVersionFromJson(const CJson* jsonObj, VersionStruct *minVer, VersionStruct *maxVer) in GetVersionFromJson() argument 182 CHECK_PTR_RETURN_ERROR_CODE(jsonObj, "jsonOb in GetVersionFromJson() 200 AddVersionToJson(CJson *jsonObj, const VersionStruct *minVer, const VersionStruct *maxVer) AddVersionToJson() argument [all...] |
/base/security/security_guard/services/security_collector/include/ |
H A D | collector_cfg_marshalling.h | 27 void to_json(nlohmann::json &jsonObj, const ModuleCfgSt &moduleCfgSt); 28 void from_json(const nlohmann::json &jsonObj, ModuleCfgSt &moduleCfgSt);
|
/base/security/security_guard/test/unittest/security_collector/include/ |
H A D | collector_cfg_marshalling.h | 27 void to_json(nlohmann::json &jsonObj, const ModuleCfgSt &moduleCfgSt) {}; in to_json() argument 28 void from_json(const nlohmann::json &jsonObj, ModuleCfgSt &moduleCfgSt) {}; in from_json() argument
|