Home
last modified time | relevance | path

Searched refs:json (Results 1 - 25 of 423) sorted by relevance

12345678910>>...17

/base/hiviewdfx/hisysevent/frameworks/native/
H A Djson_flatten_parser.cpp51 JsonFlattenParser::JsonFlattenParser(const std::string& json) in JsonFlattenParser() argument
54 Parse(json); in JsonFlattenParser()
57 void JsonFlattenParser::Parse(const std::string& json) in Parse() argument
61 while (curPos < json.length()) { in Parse()
62 if (charFilter[static_cast<uint8_t>(json[curPos])] != STRING_FLAG) { in Parse()
66 std::string key = ParseKey(json); in Parse()
67 std::string val = ParseValue(json); in Parse()
74 std::string json = "{"; in Print() local
77 json += (handler(kvList[i]) + ","); in Print()
79 json in Print()
85 ParseKey(const std::string& json) ParseKey() argument
100 ParseValue(const std::string& json) ParseValue() argument
131 ParseNumer(const std::string& json) ParseNumer() argument
144 ParseString(const std::string& json) ParseString() argument
160 ParseBrackets(const std::string& json, char leftBracket) ParseBrackets() argument
[all...]
/base/hiviewdfx/hiview/base/utility/
H A Dcjson_util.cpp36 int64_t GetIntValue(const cJSON* json, const std::string& key, int64_t defaultValue) in GetIntValue() argument
38 if (json == nullptr || !cJSON_IsObject(json)) { in GetIntValue()
41 cJSON* intJson = cJSON_GetObjectItem(json, key.c_str()); in GetIntValue()
48 double GetDoubleValue(cJSON* json, const std::string& key, double defaultValue) in GetDoubleValue() argument
50 if (json == nullptr || !cJSON_IsObject(json)) { in GetDoubleValue()
53 cJSON* doubleJson = cJSON_GetObjectItem(json, key.c_str()); in GetDoubleValue()
60 std::string GetStringValue(cJSON* json, const std::string& key) in GetStringValue() argument
62 if (json in GetStringValue()
72 GetStringArray(cJSON* json, const std::string& key, std::vector<std::string>& dest) GetStringArray() argument
94 GetObjectValue(const cJSON* json, const std::string& key) GetObjectValue() argument
106 GetArrayValue(const cJSON* json, const std::string& key) GetArrayValue() argument
118 GetBoolValue(const cJSON* json, const std::string& key, bool& value) GetBoolValue() argument
[all...]
/base/security/device_auth/test/unittest/tdd_framework/unit_test/services/creds_manager/
H A Dcreds_manager_test.cpp126 CJson *json = CreateJson(); in OnBindRequest() local
127 AddIntToJson(json, FIELD_CONFIRMATION, REQUEST_ACCEPTED); in OnBindRequest()
128 AddIntToJson(json, FIELD_OS_ACCOUNT_ID, TEST_AUTH_OS_ACCOUNT_ID); in OnBindRequest()
129 AddStringToJson(json, FIELD_PIN_CODE, TEST_PIN_CODE.c_str()); in OnBindRequest()
130 AddStringToJson(json, FIELD_DEVICE_ID, TEST_AUTH_ID2.c_str()); in OnBindRequest()
131 char *returnDataStr = PackJsonToString(json); in OnBindRequest()
132 FreeJson(json); in OnBindRequest()
138 CJson *json = CreateJson(); in OnAuthRequest() local
139 AddIntToJson(json, FIELD_CONFIRMATION, REQUEST_ACCEPTED); in OnAuthRequest()
140 AddIntToJson(json, FIELD_OS_ACCOUNT_I in OnAuthRequest()
371 CJson *json = CreateJson(); CreateDemoIdenticalAccountGroup() local
399 CJson *json = CreateJson(); CreateClientSymIdenticalAccountGroup() local
427 CJson *json = CreateJson(); CreateServerSymIdenticalAccountGroup() local
606 CJson *json = CreateJson(); HWTEST_F() local
614 CJson *json = CreateJson(); HWTEST_F() local
625 CJson *json = CreateJson(); HWTEST_F() local
635 CJson *json = CreateJson(); HWTEST_F() local
647 CJson *json = CreateJson(); HWTEST_F() local
661 CJson *json = CreateJson(); HWTEST_F() local
674 CJson *json = CreateJson(); HWTEST_F() local
688 CJson *json = CreateJson(); HWTEST_F() local
703 CJson *json = CreateJson(); HWTEST_F() local
718 CJson *json = CreateJson(); HWTEST_F() local
734 CJson *json = CreateJson(); HWTEST_F() local
752 CJson *json = CreateJson(); HWTEST_F() local
768 CJson *json = CreateJson(); HWTEST_F() local
787 CJson *json = CreateJson(); HWTEST_F() local
815 CJson *json = CreateJson(); HWTEST_F() local
834 CJson *json = CreateJson(); HWTEST_F() local
849 CJson *json = CreateJson(); HWTEST_F() local
866 CJson *json = CreateJson(); HWTEST_F() local
880 CJson *json = CreateJson(); HWTEST_F() local
891 CJson *json = CreateJson(); HWTEST_F() local
908 CJson *json = CreateJson(); HWTEST_F() local
929 CJson *json = CreateJson(); HWTEST_F() local
947 CJson *json = CreateJson(); HWTEST_F() local
966 CJson *json = CreateJson(); HWTEST_F() local
987 CJson *json = CreateJson(); HWTEST_F() local
1008 CJson *json = CreateJson(); HWTEST_F() local
1026 CJson *json = CreateJson(); HWTEST_F() local
1044 CJson *json = CreateJson(); HWTEST_F() local
1063 CJson *json = CreateJson(); HWTEST_F() local
1084 CJson *json = CreateJson(); HWTEST_F() local
1105 CJson *json = CreateJson(); HWTEST_F() local
1127 CJson *json = CreateJson(); HWTEST_F() local
1150 CJson *json = CreateJson(); HWTEST_F() local
1173 CJson *json = CreateJson(); HWTEST_F() local
1198 CJson *json = CreateJson(); HWTEST_F() local
1238 CJson *json = CreateJson(); HWTEST_F() local
1260 CJson *json = CreateJson(); HWTEST_F() local
1284 CJson *json = CreateJson(); HWTEST_F() local
1321 CJson *json = CreateJson(); HWTEST_F() local
1342 CJson *json = CreateJson(); HWTEST_F() local
1370 CJson *json = CreateJson(); HWTEST_F() local
1391 CJson *json = CreateJson(); HWTEST_F() local
1413 CJson *json = CreateJson(); HWTEST_F() local
1433 CJson *json = CreateJson(); HWTEST_F() local
1453 CJson *json = CreateJson(); HWTEST_F() local
1473 CJson *json = CreateJson(); HWTEST_F() local
1494 CJson *json = CreateJson(); HWTEST_F() local
1516 CJson *json = CreateJson(); HWTEST_F() local
1540 CJson *json = CreateJson(); HWTEST_F() local
1564 CJson *json = CreateJson(); HWTEST_F() local
1598 CJson *json = CreateJson(); HWTEST_F() local
1632 CJson *json = CreateJson(); HWTEST_F() local
1661 CJson *json = CreateJson(); HWTEST_F() local
1681 CJson *json = CreateJson(); HWTEST_F() local
1702 CJson *json = CreateJson(); HWTEST_F() local
1728 CJson *json = CreateJson(); HWTEST_F() local
1758 CJson *json = CreateJson(); HWTEST_F() local
1787 CJson *json = CreateJson(); HWTEST_F() local
1808 CJson *json = CreateJson(); HWTEST_F() local
1833 CJson *json = CreateJson(); HWTEST_F() local
1858 CJson *json = CreateJson(); HWTEST_F() local
1889 CJson *json = CreateJson(); HWTEST_F() local
1910 CJson *json = CreateJson(); HWTEST_F() local
1935 CJson *json = CreateJson(); HWTEST_F() local
[all...]
/base/security/device_auth/test/fuzztest/creds_manager/credsmanager_fuzzer/
H A Dcredsmanager_fuzzer.cpp123 CJson *json = CreateJson(); in OnBindRequest() local
124 AddIntToJson(json, FIELD_CONFIRMATION, REQUEST_ACCEPTED); in OnBindRequest()
125 AddIntToJson(json, FIELD_OS_ACCOUNT_ID, TEST_AUTH_OS_ACCOUNT_ID); in OnBindRequest()
126 AddStringToJson(json, FIELD_PIN_CODE, TEST_PIN_CODE.c_str()); in OnBindRequest()
127 AddStringToJson(json, FIELD_DEVICE_ID, TEST_AUTH_ID2.c_str()); in OnBindRequest()
128 char *returnDataStr = PackJsonToString(json); in OnBindRequest()
129 FreeJson(json); in OnBindRequest()
135 CJson *json = CreateJson(); in OnAuthRequest() local
136 AddIntToJson(json, FIELD_CONFIRMATION, REQUEST_ACCEPTED); in OnAuthRequest()
137 AddIntToJson(json, FIELD_OS_ACCOUNT_I in OnAuthRequest()
370 CJson *json = CreateJson(); CreateDemoIdenticalAccountGroup() local
396 CJson *json = CreateJson(); CreateClientSymIdenticalAccountGroup() local
419 CJson *json = CreateJson(); CreateServerSymIdenticalAccountGroup() local
566 CJson *json = CreateJson(); CredsManagerTest01() local
576 CJson *json = CreateJson(); CredsManagerTest02() local
586 CJson *json = CreateJson(); CredsManagerTest03() local
595 CJson *json = CreateJson(); CredsManagerTest04() local
606 CJson *json = CreateJson(); CredsManagerTest05() local
619 CJson *json = CreateJson(); CredsManagerTest06() local
631 CJson *json = CreateJson(); CredsManagerTest07() local
644 CJson *json = CreateJson(); CredsManagerTest08() local
658 CJson *json = CreateJson(); CredsManagerTest09() local
672 CJson *json = CreateJson(); CredsManagerTest10() local
687 CJson *json = CreateJson(); CredsManagerTest11() local
704 CJson *json = CreateJson(); CredsManagerTest12() local
719 CJson *json = CreateJson(); CredsManagerTest13() local
738 CJson *json = CreateJson(); CredsManagerTest14() local
767 CJson *json = CreateJson(); CredsManagerTest15() local
788 CJson *json = CreateJson(); CredsManagerTest16() local
802 CJson *json = CreateJson(); CredsManagerTest17() local
819 CJson *json = CreateJson(); CredsManagerTest18() local
835 CJson *json = CreateJson(); CredsManagerTest19() local
844 CJson *json = CreateJson(); CredsManagerTest20() local
857 CJson *json = CreateJson(); CredsManagerTest21() local
874 CJson *json = CreateJson(); CredsManagerTest22() local
888 CJson *json = CreateJson(); CredsManagerTest23() local
903 CJson *json = CreateJson(); CredsManagerTest24() local
920 CJson *json = CreateJson(); CredsManagerTest25() local
937 CJson *json = CreateJson(); CredsManagerTest26() local
951 CJson *json = CreateJson(); CredsManagerTest27() local
965 CJson *json = CreateJson(); CredsManagerTest28() local
980 CJson *json = CreateJson(); CredsManagerTest29() local
997 CJson *json = CreateJson(); CredsManagerTest30() local
1014 CJson *json = CreateJson(); CredsManagerTest31() local
1032 CJson *json = CreateJson(); CredsManagerTest32() local
1051 CJson *json = CreateJson(); CredsManagerTest33() local
1070 CJson *json = CreateJson(); CredsManagerTest34() local
1087 CredsManagerTestInner(CertInfo *certInfo, CJson *json, IdentityInfo *info) CredsManagerTestInner() argument
1115 CJson *json = CreateJson(); CredsManagerTest35() local
1146 CJson *json = CreateJson(); CredsManagerTest36() local
1164 CJson *json = CreateJson(); CredsManagerTest37() local
1186 CJson *json = CreateJson(); CredsManagerTest38() local
1232 CJson *json = CreateJson(); CredsManagerTest39() local
1249 CJson *json = CreateJson(); CredsManagerTest40() local
1278 CJson *json = CreateJson(); CredsManagerTest41() local
1295 CJson *json = CreateJson(); CredsManagerTest42() local
1313 CJson *json = CreateJson(); CredsManagerTest43() local
1329 CJson *json = CreateJson(); CredsManagerTest44() local
1345 CJson *json = CreateJson(); CredsManagerTest45() local
1361 CJson *json = CreateJson(); CredsManagerTest46() local
1378 CJson *json = CreateJson(); CredsManagerTest47() local
1396 CJson *json = CreateJson(); CredsManagerTest48() local
1416 CJson *json = CreateJson(); CredsManagerTest49() local
1436 CJson *json = CreateJson(); CredsManagerTest50() local
1473 CJson *json = CreateJson(); CredsManagerTest51() local
1509 CJson *json = CreateJson(); CredsManagerTest52() local
1540 CJson *json = CreateJson(); CredsManagerTest53() local
1556 CJson *json = CreateJson(); CredsManagerTest54() local
1573 CJson *json = CreateJson(); CredsManagerTest55() local
1601 CJson *json = CreateJson(); CredsManagerTest56() local
1633 CJson *json = CreateJson(); CredsManagerTest57() local
1664 CJson *json = CreateJson(); CredsManagerTest58() local
1681 CJson *json = CreateJson(); CredsManagerTest59() local
1702 CJson *json = CreateJson(); CredsManagerTest60() local
1723 CJson *json = CreateJson(); CredsManagerTest61() local
1758 CJson *json = CreateJson(); CredsManagerTest62() local
1793 CJson *json = CreateJson(); CredsManagerTest63() local
1814 CJson *json = CreateJson(); CredsManagerTest64() local
[all...]
/base/sensors/miscdevice/utils/common/src/
H A Djson_parser.cpp34 MISC_HILOGE("Read json file fail"); in JsonParser()
57 bool JsonParser::HasObjectItem(cJSON *json, const std::string &key) const in HasObjectItem() argument
59 return cJSON_HasObjectItem(json, key.c_str()); in HasObjectItem()
67 cJSON *JsonParser::GetObjectItem(cJSON *json, const std::string &key) const in GetObjectItem() argument
69 if (!cJSON_IsObject(json)) { in GetObjectItem()
70 MISC_HILOGE("The json is not object"); in GetObjectItem()
73 if (!cJSON_HasObjectItem(json, key.c_str())) { in GetObjectItem()
74 MISC_HILOGE("The json is not data:%{public}s", key.c_str()); in GetObjectItem()
77 return cJSON_GetObjectItem(json, key.c_str()); in GetObjectItem()
85 int32_t JsonParser::ParseJsonArray(cJSON *json, cons argument
120 GetArrayItem(cJSON *json, int32_t index) const GetArrayItem() argument
[all...]
/base/security/security_guard/test/unittest/config_manager/include/
H A Dmodel_cfg_marshalling.h22 #include "nlohmann/json.hpp"
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
[all...]
/base/security/security_guard/services/config_manager/include/
H A Dmodel_cfg_marshalling.h22 #include "nlohmann/json.hpp"
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
[all...]
/base/security/security_guard/frameworks/common/json/include/
H A Djson_cfg.h19 #include "nlohmann/json.hpp"
22 #define JSON_CHECK_HELPER_RETURN_IF_FAILED(json, key, type, code) \
24 if ((json).find((key)) == (json).end()) { \
27 if (!(json).at((key)).is_##type()) { \
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 jsonOb
[all...]
/base/security/appverify/interfaces/innerkits/appverify/src/init/
H A Djson_parser_utils.cpp55 bool JsonParserUtils::GetJsonString(const cJSON* json, const std::string& key, std::string& value) in GetJsonString() argument
57 if (json == NULL || !cJSON_IsObject(json)) { in GetJsonString()
60 cJSON* jsonValue = cJSON_GetObjectItemCaseSensitive(json, key.c_str()); in GetJsonString()
67 bool JsonParserUtils::GetJsonInt(const cJSON* json, const std::string& key, int& value) in GetJsonInt() argument
69 if (json == NULL || !cJSON_IsObject(json)) { in GetJsonInt()
72 cJSON* jsonValue = cJSON_GetObjectItemCaseSensitive(json, key.c_str()); in GetJsonInt()
79 bool JsonParserUtils::GetJsonStringVec(const cJSON* json, const std::string& key, StringVec& value) in GetJsonStringVec() argument
81 if (json in GetJsonStringVec()
97 ParseJsonToObjVec(const cJSON* json, const std::string& key, JsonObjVec& jsonObjVec) ParseJsonToObjVec() argument
115 ParseJsonToMap(const cJSON* json, JsonMap& jsonMap) ParseJsonToMap() argument
[all...]
/base/security/security_component_manager/frameworks/security_component/src/
H A Dsec_comp_base.cpp66 bool SecCompBase::ParseDimension(const nlohmann::json& json, const std::string& tag, DimensionT& res) in ParseDimension() argument
68 if ((json.find(tag) == json.end()) || !json.at(tag).is_number_float()) { in ParseDimension()
69 SC_LOG_ERROR(LABEL, "json: %{public}s tag invalid.", tag.c_str()); in ParseDimension()
73 res = json.at(tag).get<double>(); in ParseDimension()
77 bool SecCompBase::ParseColor(const nlohmann::json& json, const std::string& tag, SecCompColor& res) in ParseColor() argument
79 if ((json in ParseColor()
88 ParseBool(const nlohmann::json& json, const std::string& tag, bool& res) ParseBool() argument
99 ParseString(const nlohmann::json& json, const std::string& tag, std::string& res) ParseString() argument
110 ParsePadding(const nlohmann::json& json, const std::string& tag, PaddingSize& res) ParsePadding() argument
133 ParseColors(const nlohmann::json& json, const std::string& tag) ParseColors() argument
152 ParseBorders(const nlohmann::json& json, const std::string& tag) ParseBorders() argument
162 ParseSize(const nlohmann::json& json, const std::string& tag) ParseSize() argument
189 ParseParent(const nlohmann::json& json, const std::string& tag) ParseParent() argument
220 ParseRect(const nlohmann::json& json, const std::string& tag, SecCompRect& rect) ParseRect() argument
360 nlohmann::json json; ToJsonStr() local
390 ParseStyle(const nlohmann::json& json, const std::string& tag) ParseStyle() argument
[all...]
/base/security/security_component_manager/interfaces/inner_api/security_component/include/
H A Dsec_comp_base.h18 #include "nlohmann/json.hpp"
87 bool FromJson(const nlohmann::json& jsonSrc);
88 void ToJson(nlohmann::json& jsonRes) const;
139 bool ParseDimension(const nlohmann::json& json, const std::string& tag, DimensionT& res);
140 bool ParseColor(const nlohmann::json& json, const std::string& tag, SecCompColor& res);
141 bool ParseBool(const nlohmann::json& json, const std::string& tag, bool& res);
142 bool ParseString(const nlohmann::json
[all...]
/base/print/print_fwk/test/unittest/service_test/
H A Dprint_system_data_test.cpp20 #include <nlohmann/json.hpp>
29 using json = nlohmann::json;
63 const std::string PRINTER_LIST_FILE = "/data/service/el2/public/print_service/printer_list.json"; in HWTEST_F()
173 nlohmann::json printerMapJson = nlohmann::json::array(); in HWTEST_F()
174 nlohmann::json printerJson; in HWTEST_F()
180 nlohmann::json jsonObject; in HWTEST_F()
193 nlohmann::json printerMapJson; in HWTEST_F()
294 nlohmann::json printerMapJso in HWTEST_F()
[all...]
/base/security/device_auth/test/unittest/deviceauth/source/
H A Dcreds_manager_test.cpp92 CJson *json = CreateJson(); in HWTEST_F() local
93 EXPECT_NE(json, nullptr); in HWTEST_F()
94 (void)AddStringToJson(json, FIELD_USER_ID, TEST_SYM_USER_ID.c_str()); in HWTEST_F()
95 (void)AddStringToJson(json, FIELD_DEVICE_ID, TEST_SYM_DEVICE_ID.c_str()); in HWTEST_F()
96 (void)AddStringToJson(json, FIELD_AUTH_CODE, TEST_SYM_AUTH_CODE.c_str()); in HWTEST_F()
99 int32_t ret = tokenManager->addToken(DEFAULT_OS_ACCOUNT, IMPORT_TRUSTED_CREDENTIALS, json); in HWTEST_F()
103 FreeJson(json); in HWTEST_F()
114 CJson *json = CreateJson(); in HWTEST_F() local
115 EXPECT_NE(json, nullptr); in HWTEST_F()
116 ret = tokenManager->addToken(DEFAULT_OS_ACCOUNT, IMPORT_TRUSTED_CREDENTIALS, json); in HWTEST_F()
160 CJson *json = CreateJson(); HWTEST_F() local
[all...]
/base/startup/appspawn/modules/sandbox/
H A Dsandbox_utils.h25 #include "nlohmann/json.hpp"
38 static void StoreJsonConfig(nlohmann::json &appSandboxConfig, SandboxConfigType type);
39 static std::vector<nlohmann::json> &GetJsonConfig(SandboxConfigType type);
58 static int32_t DoSandboxFileCommonBind(const AppSpawningCtx *appProperty, nlohmann::json &wholeConfig);
60 nlohmann::json &wholeConfig);
61 static int32_t DoSandboxFilePrivateBind(const AppSpawningCtx *appProperty, nlohmann::json &wholeConfig);
63 nlohmann::json &wholeConfig);
65 nlohmann::json &wholeConfig);
67 nlohmann::json &wholeConfig);
69 nlohmann::json
[all...]
/base/startup/appspawn/service/hnp/base/
H A Dhnp_json.c73 static int ParseJsonStreamToHnpCfgInfo(cJSON *json, HnpCfgInfo *hnpCfg) in ParseJsonStreamToHnpCfgInfo() argument
77 cJSON *typeItem = cJSON_GetObjectItem(json, "type"); in ParseJsonStreamToHnpCfgInfo()
86 cJSON *nameItem = cJSON_GetObjectItem(json, "name"); in ParseJsonStreamToHnpCfgInfo()
96 cJSON *versionItem = cJSON_GetObjectItem(json, "version"); in ParseJsonStreamToHnpCfgInfo()
106 cJSON *installItem = cJSON_GetObjectItem(json, "install"); in ParseJsonStreamToHnpCfgInfo()
127 cJSON *json; in ParseHnpCfgFile() local
135 json = cJSON_Parse(cfgStream); in ParseHnpCfgFile()
137 if (json == NULL) { in ParseHnpCfgFile()
138 HNP_LOGE("parse json file[%{public}s] unsuccess.", hnpCfgPath); in ParseHnpCfgFile()
141 ret = ParseJsonStreamToHnpCfgInfo(json, hnpCf in ParseHnpCfgFile()
149 cJSON *json; HnpCfgGetFromSteam() local
182 HnpInstallHapExistCheck(const char *hnpPackageName, cJSON *json, cJSON **hapItemOut, int *hapIndex) HnpInstallHapExistCheck() argument
228 HnpPackageVersionUpdateAll(cJSON *json, const HnpCfgInfo *hnpCfg) HnpPackageVersionUpdateAll() argument
252 HnpHapJsonWrite(cJSON *json) HnpHapJsonWrite() argument
272 HnpHapJsonHnpAdd(bool hapExist, cJSON *json, cJSON *hapItem, const char *hnpPackageName, const HnpCfgInfo *hnpCfg) HnpHapJsonHnpAdd() argument
330 cJSON *json = NULL; HnpInstallInfoJsonWrite() local
377 HnpOtherPackageInstallCheck(const char *name, const char *version, int packageIndex, cJSON *json) HnpOtherPackageInstallCheck() argument
437 cJSON *json = cJSON_Parse(infoStream); HnpPackageJsonGet() local
455 cJSON *json = NULL; HnpPackageInfoGet() local
519 cJSON *json = cJSON_Parse(infoStream); HnpPackageInfoHnpDelete() local
560 cJSON *json = cJSON_Parse(infoStream); HnpPackageInfoDelete() local
613 cJSON *json = cJSON_Parse(infoStream); HnpCurrentVersionGet() local
657 cJSON *json = cJSON_Parse(infoStream); HnpCurrentVersionUninstallCheck() local
[all...]
/base/update/updateservice/foundations/ability/utils/include/
H A Ddupdate_json_utils.h23 #include "nlohmann/json.hpp"
35 // 开发人员请使用该工具类封装的安全函数来获取json对象/数组,以及从json对象获取Value
36 // 当前获取json对象/数组的封装使用的parse方法参数:string输入、无解析回调、解析失败不报异常
40 static int32_t GetValueAndSetTo(const nlohmann::json &jsonObject, const std::string &key, T &value) in GetValueAndSetTo()
52 static bool ParseAndGetJsonObject(const std::string &jsonStr, nlohmann::json &root) in ParseAndGetJsonObject()
54 root = nlohmann::json::parse(jsonStr, nullptr, false); in ParseAndGetJsonObject()
61 static bool ParseAndGetJsonArray(const std::string &jsonStr, nlohmann::json &root) in ParseAndGetJsonArray()
63 root = nlohmann::json::parse(jsonStr, nullptr, false); in ParseAndGetJsonArray()
70 static int32_t GetValueAndSetToArray(const nlohmann::json
[all...]
/base/startup/appspawn/util/include/
H A Djson_utils.h34 __attribute__((always_inline)) inline char *GetStringFromJsonObj(const cJSON *json, const char *key) in GetStringFromJsonObj() argument
36 APPSPAWN_CHECK_ONLY_EXPER(key != NULL && json != NULL, NULL); in GetStringFromJsonObj()
37 APPSPAWN_CHECK(cJSON_IsObject(json), return NULL, "json is not object %{public}s", key); in GetStringFromJsonObj()
38 cJSON *obj = cJSON_GetObjectItemCaseSensitive(json, key); in GetStringFromJsonObj()
40 APPSPAWN_CHECK(cJSON_IsString(obj), return NULL, "json is not string %{public}s", key); in GetStringFromJsonObj()
44 __attribute__((always_inline)) inline bool GetBoolValueFromJsonObj(const cJSON *json, const char *key, bool def) in GetBoolValueFromJsonObj() argument
46 char *value = GetStringFromJsonObj(json, key); in GetBoolValueFromJsonObj()
55 __attribute__((always_inline)) inline uint32_t GetIntValueFromJsonObj(const cJSON *json, const char *key, uint32_t def) in GetIntValueFromJsonObj() argument
57 APPSPAWN_CHECK(json ! in GetIntValueFromJsonObj()
[all...]
/base/security/security_guard/test/unittest/risk_classify/include/
H A Dmodel_cfg_marshalling.h22 #include "nlohmann/json.hpp"
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
[all...]
/base/security/security_guard/test/unittest/data_collect/sa/
H A Dmodel_cfg_marshalling.h22 #include "nlohmann/json.hpp"
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
[all...]
/base/print/print_fwk/services/print_service/include/
H A Dprint_system_data.h22 #include <nlohmann/json.hpp>
73 bool ParsePrinterListJsonV1(nlohmann::json& jsonObject);
74 bool GetJsonObjectFromFile(nlohmann::json &jsonObject, const std::string &fileName);
75 void ConvertPrinterCapabilityToJson(PrinterCapability &printerCapability, nlohmann::json &capsJson);
76 void ConvertPrintMarginToJson(PrinterCapability &printerCapability, nlohmann::json &capsJson);
77 void ConvertPageSizeToJson(PrinterCapability &printerCapability, nlohmann::json &capsJson);
78 void ConvertPrintResolutionToJson(PrinterCapability &printerCapability, nlohmann::json &capsJson);
79 void ConvertSupportedColorModeToJson(PrinterCapability &printerCapability, nlohmann::json &capsJson);
80 void ConvertSupportedDuplexModeToJson(PrinterCapability &printerCapability, nlohmann::json &capsJson);
81 void ConvertSupportedMediaTypeToJson(PrinterCapability &printerCapability, nlohmann::json
[all...]
/base/msdp/device_status/tools/vdev/include/
H A Dvirtual_keyboard_builder.h19 #include <nlohmann/json.hpp>
43 static void ReadModel(const nlohmann::json &model, int32_t level);
44 static void ReadAction(const nlohmann::json &model);
45 static void HandleDown(const nlohmann::json &model);
46 static void HandleUp(const nlohmann::json &model);
47 static void HandleWait(const nlohmann::json &model);
49 static void ReadRawModel(const nlohmann::json &model, int32_t level);
50 static void ReadRawData(const nlohmann::json &model);
H A Dvirtual_touchscreen_builder.h21 #include <nlohmann/json.hpp>
49 static void ReadModel(const nlohmann::json &model, int32_t level);
50 static void ReadAction(const nlohmann::json &model);
51 static void HandleDown(const nlohmann::json &model);
52 static void HandleMove(const nlohmann::json &model);
53 static void HandleUp(const nlohmann::json &model);
54 static void HandleMoveTo(const nlohmann::json &model);
55 static void HandleWait(const nlohmann::json &model);
57 static void ReadRawModel(const nlohmann::json &model, int32_t level);
58 static void ReadRawData(const nlohmann::json
[all...]
/base/security/access_token/services/tokensyncmanager/include/command/
H A Dbase_remote_command.h23 #include "nlohmann/json.hpp"
60 nlohmann::json ToRemoteProtocolJson();
61 void FromRemoteProtocolJson(const nlohmann::json& jsonObject);
63 void ToPermStateJson(nlohmann::json& permStateJson, const PermissionStateFull& state);
64 void FromPermStateListJson(const nlohmann::json& hapTokenJson,
67 void FromHapTokenBasicInfoJson(const nlohmann::json& hapTokenJson,
70 nlohmann::json ToHapTokenInfosJson(const HapTokenInfoForSync &tokenInfo);
71 void FromHapTokenInfoJson(const nlohmann::json& hapTokenJson, HapTokenInfoForSync& hapTokenInfo);
72 nlohmann::json ToNativeTokenInfoJson(const NativeTokenInfoForSync& tokenInfo);
73 void FromNativeTokenInfoJson(const nlohmann::json
[all...]
/base/sensors/miscdevice/utils/common/include/
H A Djson_parser.h34 int32_t ParseJsonArray(cJSON *json, const std::string &key, std::vector<std::string> &vals) const;
36 bool HasObjectItem(cJSON *json, const std::string &key) const;
38 cJSON *GetObjectItem(cJSON *json, const std::string &key) const;
40 bool IsArray(cJSON *json) const;
41 int32_t GetArraySize(cJSON *json) const;
42 cJSON *GetArrayItem(cJSON *json, int32_t index) const;
43 int32_t GetIntValue(cJSON *json) const;
44 double GetDoubleValue(cJSON *json) const;
45 std::string GetStringValue(cJSON *json) const;
/base/security/security_component_manager/services/security_component_service/sa/test/unittest/src/
H A Dservice_test_common.cpp20 void ServiceTestCommon::BuildLocationComponentJson(nlohmann::json& jsonComponent) in BuildLocationComponentJson()
24 jsonComponent[JsonTagConstants::JSON_RECT] = nlohmann::json { in BuildLocationComponentJson()
30 jsonComponent[JsonTagConstants::JSON_WINDOW_RECT] = nlohmann::json { in BuildLocationComponentJson()
36 nlohmann::json jsonPadding = nlohmann::json { in BuildLocationComponentJson()
43 jsonComponent[JsonTagConstants::JSON_SIZE_TAG] = nlohmann::json { in BuildLocationComponentJson()
50 jsonComponent[JsonTagConstants::JSON_COLORS_TAG] = nlohmann::json { in BuildLocationComponentJson()
56 jsonComponent[JsonTagConstants::JSON_BORDER_TAG] = nlohmann::json { in BuildLocationComponentJson()
59 jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { in BuildLocationComponentJson()
68 jsonComponent[JsonTagConstants::JSON_STYLE_TAG] = nlohmann::json { in BuildLocationComponentJson()
[all...]

Completed in 13 milliseconds

12345678910>>...17