/ohos5.0/foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include/ |
H A D | json_serializer.h | 46 void to_json(nlohmann::json &jsonObject, const MetaData &metaData); 50 void to_json(nlohmann::json &jsonObject, const Metadata &metadata); 64 void to_json(nlohmann::json &jsonObject, const FormInfo &formInfo); 86 void to_json(nlohmann::json &jsonObject, const Result &result); 87 void from_json(const nlohmann::json &jsonObject, Result &result); 96 void to_json(nlohmann::json &jsonObject, const Version &version); 98 void to_json(nlohmann::json &jsonObject, const PackageApp &app); 112 void to_json(nlohmann::json &jsonObject, const Summary &summary); 128 void to_json(nlohmann::json &jsonObject, const HqfInfo &hqfInfo); 157 void to_json(nlohmann::json &jsonObject, const Skill &skill); [all …]
|
/ohos5.0/foundation/bundlemanager/bundle_framework/test/benchmarktest/json_serializer_test/ |
H A D | json_serializer_test.cpp | 35 nlohmann::json jsonObject; in BenchmarkTestForCustomizeDataToJson() local 54 nlohmann::json jsonObject; in BenchmarkTestForCustomizeDataFromJson() local 56 jsonObject["value"] = "1"; in BenchmarkTestForCustomizeDataFromJson() 73 nlohmann::json jsonObject; in BenchmarkTestForMetadataToJson() local 92 nlohmann::json jsonObject; in BenchmarkTestForMetadataFromJson() local 94 jsonObject["value"] = "1"; in BenchmarkTestForMetadataFromJson() 111 nlohmann::json jsonObject; in BenchmarkTestForAbilityInfoToJson() local 130 nlohmann::json jsonObject; in BenchmarkTestForAbilityInfoFromJson() local 170 jsonObject["icon"] = "1"; in BenchmarkTestForExtensionAbilityInfoFromJson() 361 jsonObject["id"] = "1"; in BenchmarkTestForShortcutInfoFromJson() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/utils/src/ |
H A D | histreamer_ability_parser.cpp | 40 if (jsonObject == nullptr) { in FromJson() 68 if (jsonObject == nullptr) { in FromJson() 100 if (jsonObject == nullptr) { in FromJson() 137 if (jsonObject == nullptr) { in FromJson() 162 if (jsonObject == nullptr) { in FromJson() 186 if (jsonObject == nullptr) { in FromJson() 222 if (jsonObject == nullptr) { in FromJson() 247 if (jsonObject == nullptr) { in FromJson() 260 if (jsonObject == nullptr) { in FromJson() 297 if (jsonObject == nullptr) { in FromJson() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/utils/test/unittest/common/histreamer_ability_parser/ |
H A D | histreamer_ability_parser_test.cpp | 144 cJSON_Delete(jsonObject); 168 cJSON_Delete(jsonObject); 192 cJSON_Delete(jsonObject); 228 cJSON_Delete(jsonObject); 252 cJSON_Delete(jsonObject); 272 cJSON_Delete(jsonObject); 307 cJSON_Delete(jsonObject); 331 cJSON_Delete(jsonObject); 355 cJSON_Delete(jsonObject); 390 cJSON_Delete(jsonObject); [all …]
|
/ohos5.0/foundation/ability/ability_base/interfaces/kits/native/view_data/src/ |
H A D | page_node_info.cpp | 37 if (jsonObject.is_discarded()) { in FromJsonString() 41 if (jsonObject.contains(PAGE_NODE_INFO_ID) && jsonObject[PAGE_NODE_INFO_ID].is_number()) { in FromJsonString() 44 if (jsonObject.contains(PAGE_NODE_INFO_DEPTH) && jsonObject[PAGE_NODE_INFO_DEPTH].is_number()) { in FromJsonString() 50 if (jsonObject.contains(PAGE_NODE_INFO_TAG) && jsonObject[PAGE_NODE_INFO_TAG].is_string()) { in FromJsonString() 53 if (jsonObject.contains(PAGE_NODE_INFO_VALUE) && jsonObject[PAGE_NODE_INFO_VALUE].is_string()) { in FromJsonString() 62 …if (jsonObject.contains(PAGE_NODE_INFO_META_DATA) && jsonObject[PAGE_NODE_INFO_META_DATA].is_strin… in FromJsonString() 69 ParseJsonToPageNodeInfo(jsonObject); in FromJsonString() 74 if (jsonObject.is_discarded()) { in ParseJsonToPageNodeInfo() 81 …if (jsonObject.contains(PAGE_NODE_INFO_IS_FOCUS) && jsonObject[PAGE_NODE_INFO_IS_FOCUS].is_boolean… in ParseJsonToPageNodeInfo() 88 nlohmann::json jsonObject { in ToJsonString() local [all …]
|
H A D | view_data.cpp | 36 if (jsonObject.is_discarded()) { in FromJsonString() 40 … if (jsonObject.contains(VIEW_DATA_BUNDLE_NAME) && jsonObject[VIEW_DATA_BUNDLE_NAME].is_string()) { in FromJsonString() 43 … if (jsonObject.contains(VIEW_DATA_MODULE_NAME) && jsonObject[VIEW_DATA_MODULE_NAME].is_string()) { in FromJsonString() 46 …if (jsonObject.contains(VIEW_DATA_ABILITY_NAME) && jsonObject[VIEW_DATA_ABILITY_NAME].is_string())… in FromJsonString() 49 if (jsonObject.contains(VIEW_DATA_PAGE_URL) && jsonObject[VIEW_DATA_PAGE_URL].is_string()) { in FromJsonString() 52 …if (jsonObject.contains(VIEW_DATA_USER_SELECTED) && jsonObject[VIEW_DATA_USER_SELECTED].is_boolean… in FromJsonString() 55 …if (jsonObject.contains(VIEW_DATA_OTHER_ACCOUNT) && jsonObject[VIEW_DATA_OTHER_ACCOUNT].is_boolean… in FromJsonString() 58 if (jsonObject.contains(VIEW_DATA_NODES) && jsonObject[VIEW_DATA_NODES].is_array()) { in FromJsonString() 70 if (jsonObject.contains(VIEW_DATA_PAGE_RECT) && jsonObject[VIEW_DATA_PAGE_RECT].is_string()) { in FromJsonString() 82 nlohmann::json jsonObject { in ToJsonString() local [all …]
|
/ohos5.0/foundation/distributedhardware/device_manager/services/implementation/src/credential/ |
H A D | dm_credential_manager.cpp | 66 if (!IsInt32(jsonObject, FIELD_CREDENTIAL_TYPE) || !IsString(jsonObject, FIELD_CREDENTIAL_ID) || in from_json() 67 !IsString(jsonObject, FIELD_SERVER_PK) || !IsString(jsonObject, FIELD_PKINFO_SIGNATURE) || in from_json() 68 !IsString(jsonObject, FIELD_PKINFO) || !IsString(jsonObject, FIELD_AUTH_CODE) || in from_json() 100 if (jsonObject.is_discarded()) { in RequestCredential() 104 if (!IsString(jsonObject, FIELD_USER_ID) || !IsString(jsonObject, FIELD_CREDENTIAL_VERSION)) { in RequestCredential() 128 if (jsonObject.is_discarded()) { in ImportCredential() 170 if (jsonObject.is_discarded()) { in ImportLocalCredential() 174 if (!IsInt32(jsonObject, FIELD_AUTH_TYPE) || !IsString(jsonObject, FIELD_USER_ID) || in ImportLocalCredential() 218 if (jsonObject.is_discarded()) { in DeleteCredential() 222 if (!IsInt32(jsonObject, FIELD_PROCESS_TYPE) || !IsInt32(jsonObject, FIELD_AUTH_TYPE) || in DeleteCredential() [all …]
|
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/ |
H A D | pre_install_bundle_info.cpp | 41 jsonObject[APP_TYPE] = appType_; in ToJson() 42 jsonObject[REMOVABLE] = removable_; in ToJson() 45 jsonObject[LABEL_ID] = labelId_; in ToJson() 46 jsonObject[ICON_ID] = iconId_; in ToJson() 47 jsonObject[SYSTEM_APP] = systemApp_; in ToJson() 82 nlohmann::json jsonObject; in ToString() local 86 jsonObject[APP_TYPE] = appType_; in ToString() 87 jsonObject[REMOVABLE] = removable_; in ToString() 90 jsonObject[LABEL_ID] = labelId_; in ToString() 91 jsonObject[ICON_ID] = iconId_; in ToString() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_handler/histreamer_ability_querier/test/unittest/common/src/ |
H A D | histreamer_ability_querier_test.cpp | 218 cJSON_Delete(jsonObject); 248 cJSON_Delete(jsonObject); 270 cJSON_Delete(jsonObject); 289 cJSON_Delete(jsonObject); 308 cJSON_Delete(jsonObject); 345 cJSON_Delete(jsonObject); 385 cJSON_Delete(jsonObject); 417 cJSON_Delete(jsonObject); 449 cJSON_Delete(jsonObject); 494 cJSON_Delete(jsonObject); [all …]
|
/ohos5.0/foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/src/ |
H A D | bundle_pack_info.cpp | 90 jsonObject = nlohmann::json { in to_json() 132 jsonObject = nlohmann::json { in to_json() 165 jsonObject = nlohmann::json { in to_json() 198 jsonObject = nlohmann::json { in to_json() 249 jsonObject = nlohmann::json { in to_json() 285 jsonObject = nlohmann::json { in to_json() 336 jsonObject = nlohmann::json { in to_json() 378 jsonObject = nlohmann::json { in to_json() 447 jsonObject = nlohmann::json { in to_json() 480 jsonObject = nlohmann::json { in to_json() [all …]
|
H A D | distributed_bundle_info.cpp | 103 nlohmann::json jsonObject; in ToString() local 104 jsonObject[JSON_KEY_VERSION] = version; in ToString() 111 jsonObject[JSON_KEY_APP_ID] = appId; in ToString() 113 jsonObject[JSON_KEY_ENABLED] = enabled; in ToString() 116 return jsonObject.dump(); in ToString() 122 if (jsonObject.is_discarded()) { in FromJsonString() 129 GetValueIfFindKey<uint32_t>(jsonObject, in FromJsonString() 145 GetValueIfFindKey<uint32_t>(jsonObject, in FromJsonString() 153 GetValueIfFindKey<uint32_t>(jsonObject, in FromJsonString() 201 GetValueIfFindKey<bool>(jsonObject, in FromJsonString() [all …]
|
/ohos5.0/base/update/updateservice/foundations/ability/utils/include/ |
H A D | dupdate_json_utils.h | 42 if (jsonObject.find(key) == jsonObject.end()) { in GetValueAndSetTo() 73 if (jsonObject.find(key) == jsonObject.end()) { in GetValueAndSetToArray() 85 if (jsonObject.is_array()) { in SetJsonToVector() 86 for (nlohmann::json::iterator it = jsonObject.begin(); it != jsonObject.end(); ++it) { in SetJsonToVector() 107 if (jsonObject.find(key) == jsonObject.end()) { in IsArray() 135 return jsonObject.is_string(); in CheckType() 140 return jsonObject.is_number(); in CheckType() 145 return jsonObject.is_number(); in CheckType() 150 return jsonObject.is_number(); in CheckType() 155 return jsonObject.is_number(); in CheckType() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_handler/histreamer_ability_querier/src/ |
H A D | histreamer_ability_querier.cpp | 158 if (jsonObject == nullptr) { in ToJson() 198 if (jsonObject == nullptr) { in ToJson() 210 if (jsonObject == nullptr) { in FromJson() 254 if (jsonObject == nullptr) { in ToJson() 380 if (jsonObject == nullptr) { in ToJson() 421 if (jsonObject == nullptr) { in ToJson() 463 if (jsonObject == nullptr) { in ToJson() 1000 cJSON_Delete(jsonObject); in QueryAudioEncoderAbilityStr() 1027 cJSON_Delete(jsonObject); in QueryAudioDecoderAbilityStr() 1054 cJSON_Delete(jsonObject); in QueryVideoEncoderAbilityStr() [all …]
|
/ohos5.0/foundation/ability/ability_runtime/frameworks/simulator/ability_simulator/include/bundle_parser/ |
H A D | json_serializer.h | 33 void to_json(nlohmann::json &jsonObject, const MetaData &metaData); 34 void to_json(nlohmann::json &jsonObject, const Metadata &metadata); 35 void to_json(nlohmann::json &jsonObject, const AbilityInfo &abilityInfo); 37 void from_json(const nlohmann::json &jsonObject, MetaData &metaData); 38 void from_json(const nlohmann::json &jsonObject, Metadata &metadata); 42 void from_json(const nlohmann::json &jsonObject, Resource &resource); 43 void to_json(nlohmann::json &jsonObject, const Resource &resource); 46 void from_json(const nlohmann::json &jsonObject, ProxyData &proxyData); 47 void to_json(nlohmann::json &jsonObject, const ProxyData &proxyData); 49 void to_json(nlohmann::json &jsonObject, const Dependency &dependency); [all …]
|
/ohos5.0/foundation/ability/ability_runtime/frameworks/simulator/ability_simulator/src/bundle_parser/ |
H A D | ability_info.cpp | 108 jsonObject = nlohmann::json { in to_json() 117 jsonObject = nlohmann::json { in to_json() 124 jsonObject = nlohmann::json { in to_json() 134 jsonObject = nlohmann::json { in to_json() 364 GetValueIfFindKey<bool>(jsonObject, in from_json() 476 GetValueIfFindKey<bool>(jsonObject, in from_json() 484 GetValueIfFindKey<bool>(jsonObject, in from_json() 492 GetValueIfFindKey<bool>(jsonObject, in from_json() 500 GetValueIfFindKey<bool>(jsonObject, in from_json() 508 GetValueIfFindKey<bool>(jsonObject, in from_json() [all …]
|
H A D | application_info.cpp | 115 jsonObject = nlohmann::json { in to_json() 157 jsonObject = nlohmann::json { in to_json() 347 GetValueIfFindKey<bool>(jsonObject, in from_json() 355 GetValueIfFindKey<bool>(jsonObject, in from_json() 363 GetValueIfFindKey<bool>(jsonObject, in from_json() 371 GetValueIfFindKey<bool>(jsonObject, in from_json() 539 GetValueIfFindKey<int>(jsonObject, in from_json() 587 GetValueIfFindKey<int>(jsonObject, in from_json() 651 GetValueIfFindKey<int>(jsonObject, in from_json() 803 GetValueIfFindKey<int>(jsonObject, in from_json() [all …]
|
H A D | hap_module_info.cpp | 84 jsonObject = nlohmann::json { in to_json() 108 jsonObject = nlohmann::json { in to_json() 159 jsonObject = nlohmann::json { in to_json() 240 GetValueIfFindKey<int>(jsonObject, in from_json() 256 GetValueIfFindKey<int>(jsonObject, in from_json() 272 GetValueIfFindKey<int>(jsonObject, in from_json() 320 GetValueIfFindKey<int>(jsonObject, in from_json() 424 GetValueIfFindKey<bool>(jsonObject, in from_json() 432 GetValueIfFindKey<bool>(jsonObject, in from_json() 440 GetValueIfFindKey<bool>(jsonObject, in from_json() [all …]
|
/ohos5.0/base/notification/distributed_notification_service/frameworks/ans/src/ |
H A D | notification_request.cpp | 849 if (jsonObject.is_null() or !jsonObject.is_object()) { in FromJson() 873 if (jsonObject.find("wantAgent") != jsonEnd && jsonObject.at("wantAgent").is_string()) { in FromJson() 895 if (jsonObject.find("extraInfo") != jsonEnd && jsonObject.at("extraInfo").is_string()) { in FromJson() 2043 if (jsonObject.find("id") != jsonEnd && jsonObject.at("id").is_number_integer()) { in ConvertJsonToNum() 2047 if (jsonObject.find("color") != jsonEnd && jsonObject.at("color").is_number_integer()) { in ConvertJsonToNum() 2103 if (jsonObject.find("groupName") != jsonEnd && jsonObject.at("groupName").is_string()) { in ConvertJsonToString() 2107 if (jsonObject.find("label") != jsonEnd && jsonObject.at("label").is_string()) { in ConvertJsonToString() 2167 if (jsonObject.find("isOngoing") != jsonEnd && jsonObject.at("isOngoing").is_boolean()) { in ConvertJsonToBool() 2198 if (jsonObject.find("isAgent") != jsonEnd && jsonObject.at("isAgent").is_boolean()) { in ConvertJsonToBoolExt() 2212 if (jsonObject.find("smallIcon") != jsonEnd && jsonObject.at("smallIcon").is_string()) { in ConvertJsonToPixelMap() [all …]
|
H A D | message_user.cpp | 111 jsonObject["key"] = key_; in ToJson() 112 jsonObject["name"] = name_; in ToJson() 115 jsonObject["isMachine"] = isMachine_; in ToJson() 123 if (jsonObject.is_null() or !jsonObject.is_object()) { in FromJson() 134 const auto &jsonEnd = jsonObject.cend(); in FromJson() 135 if (jsonObject.find("key") != jsonEnd && jsonObject.at("key").is_string()) { in FromJson() 139 if (jsonObject.find("name") != jsonEnd && jsonObject.at("name").is_string()) { in FromJson() 143 if (jsonObject.find("pixelMap") != jsonEnd && jsonObject.at("pixelMap").is_string()) { in FromJson() 148 if (jsonObject.find("uri") != jsonEnd && jsonObject.at("uri").is_string()) { in FromJson() 152 if (jsonObject.find("isMachine") != jsonEnd && jsonObject.at("isMachine").is_boolean()) { in FromJson() [all …]
|
H A D | notification_time.cpp | 80 bool NotificationTime::ToJson(nlohmann::json &jsonObject) const in ToJson() 82 jsonObject["initialTime"] = initialTime_; in ToJson() 83 jsonObject["isCountDown"] = isCountDown_; in ToJson() 84 jsonObject["isPaused"] = isPaused_; in ToJson() 85 jsonObject["isInTitle"] = isInTitle_; in ToJson() 92 if (jsonObject.is_null() or !jsonObject.is_object()) { in FromJson() 103 const auto &jsonEnd = jsonObject.cend(); in FromJson() 104 …if (jsonObject.find("initialTime") != jsonEnd && jsonObject.at("initialTime").is_number_integer())… in FromJson() 108 if (jsonObject.find("isCountDown") != jsonEnd && jsonObject.at("isCountDown").is_boolean()) { in FromJson() 112 if (jsonObject.find("isPaused") != jsonEnd && jsonObject.at("isPaused").is_boolean()) { in FromJson() [all …]
|
/ohos5.0/foundation/ability/dmsfwk/services/dtbschedmgr/src/mission/ |
H A D | distributed_bundle_info.cpp | 73 nlohmann::json jsonObject; in ToString() local 75 return jsonObject.dump(); in ToString() 81 jsonObject = nlohmann::json { in to_json() 92 GetValueIfFindKey<uint16_t>(jsonObject, in from_json() 109 if (jsonObject.is_discarded()) { in FromJsonString() 166 jsonObject = nlohmann::json { in to_json() 284 nlohmann::json jsonObject; in ToString() local 285 jsonObject[JSON_KEY_VERSION] = version; in ToString() 292 jsonObject[JSON_KEY_APP_ID] = appId; in ToString() 299 return jsonObject.dump(); in ToString() [all …]
|
/ohos5.0/base/notification/distributed_notification_service/services/ans/src/clone/ |
H A D | notification_clone_bundle_info.cpp | 126 jsonObject[BUNDLE_INFO_NAME] = bundleName_; in ToJson() 127 jsonObject[BUNDLE_INFO_APP_INDEX] = appIndex_; in ToJson() 128 jsonObject[BUNDLE_INFO_SLOT_FLAGS] = slotFlags_; in ToJson() 135 …if (!jsonObject.contains(BUNDLE_INFO_SLOT_LIST) || !jsonObject[BUNDLE_INFO_SLOT_LIST].is_array()) { in SlotsFromJson() 159 if (jsonObject.is_null() || !jsonObject.is_object()) { in FromJson() 163 if (jsonObject.is_discarded()) { in FromJson() 168 if (jsonObject.contains(BUNDLE_INFO_NAME) && jsonObject[BUNDLE_INFO_NAME].is_string()) { in FromJson() 171 … if (jsonObject.contains(BUNDLE_INFO_APP_INDEX) && jsonObject[BUNDLE_INFO_APP_INDEX].is_number()) { in FromJson() 174 …if (jsonObject.contains(BUNDLE_INFO_SLOT_FLAGS) && jsonObject[BUNDLE_INFO_SLOT_FLAGS].is_number())… in FromJson() 177 …if (jsonObject.contains(BUNDLE_INFO_SHOW_BADGE) && jsonObject[BUNDLE_INFO_SHOW_BADGE].is_number())… in FromJson() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/resourcemanager/ |
H A D | meta_capability_info.cpp | 147 void ToJson(cJSON *jsonObject, const MetaCapabilityInfo &metaCapInfo) in ToJson() argument 149 if (jsonObject == nullptr) { in ToJson() 166 if (!IsString(jsonObject, DH_ID)) { in FromJson() 172 if (!IsString(jsonObject, DEV_ID)) { in FromJson() 178 if (!IsString(jsonObject, DEV_NAME)) { in FromJson() 184 if (!IsUInt16(jsonObject, DEV_TYPE)) { in FromJson() 190 if (!IsUInt32(jsonObject, DH_TYPE)) { in FromJson() 196 if (!IsString(jsonObject, DH_ATTRS)) { in FromJson() 202 if (!IsString(jsonObject, DH_SUBTYPE)) { in FromJson() 208 if (!IsString(jsonObject, DEV_UDID_HASH)) { in FromJson() [all …]
|
H A D | version_info.cpp | 69 if (jsonObject == nullptr) { in ToJson() 98 void FromJson(const cJSON *jsonObject, CompVersion &compVer) in FromJson() argument 100 if (jsonObject == nullptr) { in FromJson() 104 if (IsString(jsonObject, NAME)) { in FromJson() 107 if (IsUInt32(jsonObject, TYPE) && in FromJson() 111 if (IsString(jsonObject, HANDLER)) { in FromJson() 114 if (IsString(jsonObject, SOURCE_VER)) { in FromJson() 117 if (IsString(jsonObject, SINK_VER)) { in FromJson() 124 if (jsonObject == nullptr) { in FromJson() 128 if (IsString(jsonObject, DEV_ID)) { in FromJson() [all …]
|
/ohos5.0/foundation/deviceprofile/device_info_manager/old/services/core/src/authority/ |
H A D | trust_group_manager.cpp | 38 …if (jsonObject.find(FIELD_GROUP_NAME) != jsonObject.end() && jsonObject[FIELD_GROUP_NAME].is_strin… in from_json() 39 jsonObject.at(FIELD_GROUP_NAME).get_to(groupInfo.groupName); in from_json() 41 …if (jsonObject.find(FIELD_GROUP_ID) != jsonObject.end() && jsonObject[FIELD_GROUP_ID].is_string())… in from_json() 42 jsonObject.at(FIELD_GROUP_ID).get_to(groupInfo.groupId); in from_json() 44 …if (jsonObject.find(FIELD_GROUP_OWNER) != jsonObject.end() && jsonObject[FIELD_GROUP_OWNER].is_str… in from_json() 47 …if (jsonObject.find(FIELD_GROUP_TYPE) != jsonObject.end() && jsonObject[FIELD_GROUP_TYPE].is_numbe… in from_json() 48 jsonObject.at(FIELD_GROUP_TYPE).get_to(groupInfo.groupType); in from_json() 50 if (jsonObject.find(FIELD_GROUP_VISIBILITY) != jsonObject.end() && in from_json() 51 jsonObject[FIELD_GROUP_VISIBILITY].is_number_integer()) { in from_json() 112 if (jsonObject.is_discarded()) { in CheckGroupsInfo() [all …]
|