Home
last modified time | relevance | path

Searched refs:jsonValue (Results 1 – 8 of 8) sorted by relevance

/base/notification/distributed_notification_service/frameworks/ans/test/unittest/
Dreminder_request_test.cpp1957 std::string jsonValue = ""; variable
1958 rrc->RecoverWantAgentByJson(jsonValue, 0);
1961 jsonValue = "{}";
1962 rrc->RecoverWantAgentByJson(jsonValue, 0);
1965 jsonValue = R"({"pkgName":1})";
1966 rrc->RecoverWantAgentByJson(jsonValue, 0);
1969 jsonValue = R"({"pkgName":"com.example.myapplication"})";
1970 rrc->RecoverWantAgentByJson(jsonValue, 0);
1973 jsonValue = R"({"pkgName":"com.example.myapplication","abilityName":1})";
1974 rrc->RecoverWantAgentByJson(jsonValue, 0);
[all …]
/base/hiviewdfx/hiappevent/frameworks/js/napi/src/
Dnapi_util.cpp541 napi_value CreateBaseValueByJson(const napi_env env, const Json::Value& jsonValue) in CreateBaseValueByJson() argument
543 if (jsonValue.isBool()) { in CreateBaseValueByJson()
544 return CreateBoolean(env, jsonValue.asBool()); in CreateBaseValueByJson()
546 if (jsonValue.isInt()) { in CreateBaseValueByJson()
547 return CreateInt32(env, jsonValue.asInt()); in CreateBaseValueByJson()
549 if (jsonValue.isInt64() && jsonValue.type() != Json::ValueType::uintValue) { in CreateBaseValueByJson()
550 return CreateInt64(env, jsonValue.asInt64()); in CreateBaseValueByJson()
552 if (jsonValue.isDouble()) { in CreateBaseValueByJson()
553 return CreateDouble(env, jsonValue.asDouble()); in CreateBaseValueByJson()
555 if (jsonValue.isString()) { in CreateBaseValueByJson()
[all …]
/base/hiviewdfx/hisysevent/interfaces/js/kits/napi/src/
Dnapi_hisysevent_util.cpp665 bool CreateParamItemTypeValue(const napi_env env, Json::Value& jsonValue, napi_value& value) in CreateParamItemTypeValue() argument
667 if (jsonValue.isBool()) { in CreateParamItemTypeValue()
668 CreateBoolValue(env, jsonValue.asBool(), value); in CreateParamItemTypeValue()
671 if (jsonValue.isInt()) { in CreateParamItemTypeValue()
672 NapiHiSysEventUtil::CreateInt32Value(env, static_cast<int32_t>(jsonValue.asInt()), value); in CreateParamItemTypeValue()
675 if (jsonValue.isUInt()) { in CreateParamItemTypeValue()
676 CreateUint32Value(env, static_cast<uint32_t>(jsonValue.asUInt()), value); in CreateParamItemTypeValue()
680 if (jsonValue.isInt64() && jsonValue.type() != Json::ValueType::uintValue) { in CreateParamItemTypeValue()
681 NapiHiSysEventUtil::CreateInt64Value(env, jsonValue.asInt64(), value); in CreateParamItemTypeValue()
684 if (jsonValue.isUInt64() && jsonValue.type() != Json::ValueType::intValue) { in CreateParamItemTypeValue()
[all …]
/base/account/os_account/interfaces/kits/napi/common/src/
Dnapi_account_common.cpp573 napi_value jsonValue; in JsObjectToNativeString() local
574 napi_get_named_property(env, globalValue, "JSON", &jsonValue); in JsObjectToNativeString()
577 napi_get_named_property(env, jsonValue, "stringify", &stringifyValue); in JsObjectToNativeString()
580 napi_call_function(env, jsonValue, stringifyValue, 1, funcArgv, &transValue); in JsObjectToNativeString()
600 napi_value jsonValue; in NativeStringToJsObject() local
601 napi_get_named_property(env, globalValue, "JSON", &jsonValue); in NativeStringToJsObject()
603 napi_get_named_property(env, jsonValue, "parse", &parseValue); in NativeStringToJsObject()
607 NAPI_CALL(env, napi_call_function(env, jsonValue, parseValue, 1, funcArgv, &jsObjData)); in NativeStringToJsObject()
/base/hiviewdfx/hiappevent/frameworks/js/napi/include/
Dnapi_util.h84 napi_value CreateBaseValueByJson(const napi_env env, const Json::Value& jsonValue);
85 napi_value CreateValueByJson(napi_env env, const Json::Value& jsonValue);
/base/global/resource_management/frameworks/resmgr/src/
Dtheme_pack_resource.cpp166 cJSON *jsonValue = cJSON_Parse(jsonData); in ParseJson() local
168 cJSON *floatRoot = cJSON_GetObjectItem(jsonValue, "float"); in ParseJson()
171 cJSON *colorRoot = cJSON_GetObjectItem(jsonValue, "color"); in ParseJson()
179 cJSON_Delete(jsonValue); in ParseJson()
/base/msdp/device_status/intention/adapters/ddp_adapter/src/
Dddp_adapter_impl.cpp243 cJSON* jsonValue = cJSON_GetObjectItem(parser.json, name.c_str()); in GetProperty() local
244 if (jsonValue == nullptr) { in GetProperty()
248 return parse(jsonValue); in GetProperty()
/base/telephony/core_service/test/unittest/core_service_gtest/
Dzero_branch_test_core_service.cpp757 std::string jsonValue = ""; variable
766 EXPECT_TRUE(coreServiceClient->IsAllowedInsertApn(jsonValue));