Home
last modified time | relevance | path

Searched refs:Json (Results 1 – 25 of 92) sorted by relevance

1234

/base/powermgr/battery_statistics/services/native/include/
Dbattery_stats_listener.h34 void ProcessHiSysEvent(const std::string& eventName, const Json::Value& root);
35 …void ProcessPhoneEvent(StatsUtils::StatsData& data, const Json::Value& root, const std::string& ev…
36 void ProcessWakelockEvent(StatsUtils::StatsData& data, const Json::Value& root);
37 …void ProcessDispalyEvent(StatsUtils::StatsData& data, const Json::Value& root, const std::string& …
38 void ProcessBatteryEvent(StatsUtils::StatsData& data, const Json::Value& root);
39 void ProcessThermalEvent(StatsUtils::StatsData& data, const Json::Value& root);
40 void ProcessWorkschedulerEvent(StatsUtils::StatsData& data, const Json::Value& root);
41 void ProcessFlashlightEvent(StatsUtils::StatsData& data, const Json::Value& root);
42 …void ProcessCameraEvent(StatsUtils::StatsData& data, const Json::Value& root, const std::string& e…
43 void ProcessAudioEvent(StatsUtils::StatsData& data, const Json::Value& root);
[all …]
/base/hiviewdfx/hisysevent/frameworks/native/include/
Dhisysevent_json_decorator.h33 using BaseInfoHandler = std::function<bool(const Json::Value&)>;
34 using ExtensiveInfoHander = std::function<bool(const Json::Value&, const Json::Value&)>;
43 bool CheckAttrDecorationNeed(const Json::Value& eventJson, const std::string& key,
44 const Json::Value& standard);
45 Validity CheckAttrValidity(const Json::Value& eventJson, const std::string& key,
46 const Json::Value& standard);
47 Validity CheckLevelValidity(const Json::Value& baseInfo);
48 bool CheckEventDecorationNeed(const Json::Value& eventJson, BaseInfoHandler baseJsonInfoHandler,
52 bool JudgeDataType(const std::string& dataType, const Json::Value& eventJson);
55 Json::Value root;
/base/customization/enterprise_device_management/interfaces/inner_api/plugin_kits/src/utils/
Djson_serializer.cpp21 bool JsonSerializer::Deserialize(const std::string &jsonString, Json::Value &dataObj) in Deserialize()
25 Json::CharReaderBuilder builder; in Deserialize()
26 const std::unique_ptr<Json::CharReader> reader(builder.newCharReader()); in Deserialize()
34 bool JsonSerializer::Serialize(const Json::Value &dataObj, std::string &jsonString) in Serialize()
36 Json::StreamWriterBuilder builder; in Serialize()
38 jsonString = Json::writeString(builder, dataObj); in Serialize()
42 bool JsonSerializer::GetPolicy(MessageParcel &data, Json::Value &result) in GetPolicy()
48 bool JsonSerializer::WritePolicy(MessageParcel &reply, Json::Value &result) in WritePolicy()
57 bool JsonSerializer::MergePolicy(std::vector<Json::Value> &data, Json::Value &result) in MergePolicy()
Dmap_string_serializer.cpp26 Json::Value root; in Deserialize()
29 Json::CharReaderBuilder builder; in Deserialize()
30 const std::unique_ptr<Json::CharReader> reader(builder.newCharReader()); in Deserialize()
43 …if (root[member].type() != Json::ValueType::stringValue && root[member].type() != Json::ValueType:… in Deserialize()
44 …root[member].type() != Json::ValueType::uintValue && root[member].type() != Json::ValueType::boole… in Deserialize()
59 Json::Value root; in Serialize()
63 Json::StreamWriterBuilder builder; in Serialize()
65 jsonString = Json::writeString(builder, root); in Serialize()
/base/customization/enterprise_device_management/interfaces/inner_api/plugin_kits/include/utils/
Djson_serializer.h27 class JsonSerializer : public IPolicySerializer<Json::Value>, public DelayedSingleton<JsonSerialize…
29 bool Deserialize(const std::string &jsonString, Json::Value &dataObj) override;
31 bool Serialize(const Json::Value &dataObj, std::string &jsonString) override;
33 bool GetPolicy(MessageParcel &data, Json::Value &result) override;
35 bool WritePolicy(MessageParcel &reply, Json::Value &result) override;
37 bool MergePolicy(std::vector<Json::Value> &data, Json::Value &result) override;
/base/hiviewdfx/hiview/plugins/usage_event_report/cache/include/
Djson_parser.h33 static bool ParseJsonString(Json::Value& root, const std::string& jsonStr);
34 static bool CheckJsonValue(const Json::Value& value, const std::vector<std::string>& fields);
35 static uint32_t ParseUInt32(const Json::Value& value);
36 static uint64_t ParseUInt64(const Json::Value& value);
37 static std::string ParseString(const Json::Value& value);
38 static void ParseUInt32Vec(const Json::Value& value, std::vector<uint32_t>& vec);
39 static void ParseStringVec(const Json::Value& value, std::vector<std::string>& vec);
/base/hiviewdfx/hiview/adapter/service/idl/src/
Dhiview_log_config_manager.cpp31 Json::Value ParseJsonFile(const std::string& path) in ParseJsonFile()
33 Json::Value jsonRoot; in ParseJsonFile()
36 Json::CharReaderBuilder builder; in ParseJsonFile()
37 Json::CharReaderBuilder::strictMode(&builder.settings_); in ParseJsonFile()
41 Json::Reader reader(Json::Features::strictMode()); in ParseJsonFile()
45 return Json::Value(); in ParseJsonFile()
50 inline bool IsStringMember(const Json::Value& jsonRoot, const std::string& key) in ParseJsonFile()
55 inline bool IsBoolMember(const Json::Value& jsonRoot, const std::string& key) in ParseJsonFile()
73 Json::Value jsonRoot = ParseJsonFile(CONFIG_FILE_PATH); in GetLogConfigFromFile()
/base/hiviewdfx/hiview/base/event_report/event/
Dlogger_event.cpp26 using ParamValueAdder = void (*)(Json::Value &root, const std::string &name, const ParamValue& valu…
28 void AddUint8Value(Json::Value &root, const std::string &name, const ParamValue& value) in AddUint8Value()
33 void AddUint16Value(Json::Value &root, const std::string &name, const ParamValue& value) in AddUint16Value()
38 void AddUint32Value(Json::Value &root, const std::string &name, const ParamValue& value) in AddUint32Value()
43 void AddUint64Value(Json::Value &root, const std::string &name, const ParamValue& value) in AddUint64Value()
48 void AddStringValue(Json::Value &root, const std::string &name, const ParamValue& value) in AddStringValue()
53 void AddUint32VecValue(Json::Value &root, const std::string &name, const ParamValue& value) in AddUint32VecValue()
61 void AddStringVecValue(Json::Value &root, const std::string &name, const ParamValue& value) in AddStringVecValue()
87 Json::Value root; in ToJsonString()
99 Json::StreamWriterBuilder builder; in ToJsonString()
[all …]
/base/hiviewdfx/hisysevent/frameworks/native/
Dhisysevent_json_decorator.cpp52 Json::CharReaderBuilder jsonRBuilder; in HiSysEventJsonDecorator()
53 Json::CharReaderBuilder::strictMode(&jsonRBuilder.settings_); in HiSysEventJsonDecorator()
57 Json::Reader reader(Json::Features::strictMode()); in HiSysEventJsonDecorator()
67 bool HiSysEventJsonDecorator::CheckAttrDecorationNeed(const Json::Value& eventJson, const std::stri… in HiSysEventJsonDecorator()
68 const Json::Value& standard) in HiSysEventJsonDecorator()
75 Validity HiSysEventJsonDecorator::CheckAttrValidity(const Json::Value& eventJson, const std::string… in HiSysEventJsonDecorator()
76 const Json::Value& standard) in HiSysEventJsonDecorator()
93 Validity HiSysEventJsonDecorator::CheckLevelValidity(const Json::Value& baseInfo) in HiSysEventJsonDecorator()
108 bool HiSysEventJsonDecorator::CheckEventDecorationNeed(const Json::Value& eventJson, in HiSysEventJsonDecorator()
119 Json::Value definedDomain = root[domain]; in HiSysEventJsonDecorator()
[all …]
/base/hiviewdfx/hiview/base/include/
Ddispatch_config.h35 void ParseEventTypes(const Json::Value& root);
36 void ParseTagEvents(const Json::Value& root);
37 void ParseEvents(const Json::Value& root);
38 void ParseDomainRule(const Json::Value& root);
39 void ParseDomains(const Json::Value& json, DomainRule &domainRule);
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent_manager/
Dhisysevent_record.cpp32 constexpr Json::UInt64 BIT = 2;
33 constexpr Json::UInt64 BIT_AND_VAL = 1;
42 static inline double int64ToDouble(Json::UInt64 value) in int64ToDouble()
44 return static_cast<double>(Json::Int64(value / BIT)) * DOUBLE_CONVERT_FACTOR + in int64ToDouble()
45 static_cast<double>(Json::Int64(value & BIT_AND_VAL)); in int64ToDouble()
336 Json::CharReaderBuilder jsonRBuilder; in ParseJsonStr()
337 Json::CharReaderBuilder::strictMode(&jsonRBuilder.settings_); in ParseJsonStr()
338 std::unique_ptr<Json::CharReader> const reader(jsonRBuilder.newCharReader()); in ParseJsonStr()
342 Json::Reader reader(Json::Features::strictMode()); in ParseJsonStr()
359 if (!hasInitialized_ || (jsonVal_.type() != Json::ValueType::nullValue && in ParseJsonStr()
[all …]
/base/hiviewdfx/hiview/plugins/usage_event_report/cache/
Djson_parser.cpp40 bool JsonParser::ParseJsonString(Json::Value& eventJson, const std::string& jsonStr) in ParseJsonString()
42 Json::CharReaderBuilder jsonRBuilder; in ParseJsonString()
43 Json::CharReaderBuilder::strictMode(&jsonRBuilder.settings_); in ParseJsonString()
44 std::unique_ptr<Json::CharReader> const reader(jsonRBuilder.newCharReader()); in ParseJsonString()
49 bool JsonParser::CheckJsonValue(const Json::Value& eventJson, const std::vector<std::string>& field… in CheckJsonValue()
59 uint32_t JsonParser::ParseUInt32(const Json::Value& value) in ParseUInt32()
64 uint64_t JsonParser::ParseUInt64(const Json::Value& value) in ParseUInt64()
69 std::string JsonParser::ParseString(const Json::Value& value) in ParseString()
74 void JsonParser::ParseUInt32Vec(const Json::Value& root, std::vector<uint32_t>& vec) in ParseUInt32Vec()
84 void JsonParser::ParseStringVec(const Json::Value& root, std::vector<std::string>& vec) in ParseStringVec()
[all …]
/base/telephony/core_service/services/sim/src/
Doperator_file_parser.cpp34 bool OperatorFileParser::WriteOperatorConfigJson(std::string filename, const Json::Value &root) in WriteOperatorConfigJson()
48 Json::StreamWriterBuilder jswBuilder; in WriteOperatorConfigJson()
50 std::unique_ptr<Json::StreamWriter> jsWriter(jswBuilder.newStreamWriter()); in WriteOperatorConfigJson()
80 bool OperatorFileParser::ParseFromCustomSystem(int32_t slotId, OperatorConfig &opc, Json::Value &op… in ParseFromCustomSystem()
95 Json::Value temp; in ParseFromCustomSystem()
101 Json::Value::Members mem = temp.getMemberNames(); in ParseFromCustomSystem()
111 …er::ParseOperatorConfigFromFile(OperatorConfig &opc, const std::string &path, Json::Value &opcJson) in ParseOperatorConfigFromFile()
123 Json::CharReaderBuilder builder; in ParseOperatorConfigFromFile()
124 Json::CharReader *reader(builder.newCharReader()); in ParseOperatorConfigFromFile()
135 void OperatorFileParser::ParseOperatorConfigFromJson(const Json::Value &root, OperatorConfig &opc) in ParseOperatorConfigFromJson()
[all …]
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent_manager/include/
Dhisysevent_value.h31 HiSysEventValue(Json::Value jsonVal): jsonVal_(jsonVal), hasInitialized_(true) {} in HiSysEventValue()
50 Json::Value Index(const int index) const;
51 Json::Value GetParamValue(const std::string& key) const;
52 Json::ValueType Type() const;
59 Json::Value jsonVal_;
/base/telephony/core_service/services/sim/include/
Doperator_file_parser.h29 bool ParseFromCustomSystem(int32_t slotId, OperatorConfig &opc, Json::Value &opcJson);
30 …bool ParseOperatorConfigFromFile(OperatorConfig &poc, const std::string &path, Json::Value &opcJso…
31 bool WriteOperatorConfigJson(std::string filename, const Json::Value &root);
38 void ParseOperatorConfigFromJson(const Json::Value &root, OperatorConfig &poc);
40 void ParseArray(const std::string key, const Json::Value &arrayValue_, OperatorConfig &poc);
/base/hiviewdfx/hiview/core/include/
Devent_json_parser.h39 using JSON_VALUE_LOOP_HANDLER = std::function<void(const std::string&, const Json::Value&)>;
67 bool HasIntMember(const Json::Value& jsonObj, const std::string& name) const;
68 bool HasStringMember(const Json::Value& jsonObj, const std::string& name) const;
69 bool HasBoolMember(const Json::Value& jsonObj, const std::string& name) const;
70 void InitEventInfoMapRef(const Json::Value& jsonObj, JSON_VALUE_LOOP_HANDLER handler) const;
71 BaseInfo ParseBaseConfig(const Json::Value& eventNameJson) const;
72 void ParseHiSysEventDef(const Json::Value& hiSysEventDef);
73 NAME_INFO_MAP ParseNameConfig(const Json::Value& domainJson) const;
/base/hiviewdfx/hiview/utility/smart_parser/rule/include/
Dextract_rule.h39 void ParseSegStatusCfg(const Json::Value& json);
40 …void ParseRule(const std::string& eventType, const Json::Value& json, const std::string& fullPath);
44 std::vector<std::string> SplitFeatureId(const Json::Value& oject) const;
45 void ParseRule(const Json::Value& oject, std::list<FeatureRule>& features) const;
46 …void ParseRuleParam(const Json::Value& oject, std::list<FeatureRule>& features, const std::string&…
47 void GetExtractParam(const Json::Value& rules,
49 std::vector<std::string> GetJsonArray(const Json::Value& json, const std::string& param);
/base/hiviewdfx/hiview/base/
Ddispatch_config.cpp34 Json::Value root; in HiviewRuleParser()
37 Json::CharReaderBuilder jsonRBuilder; in HiviewRuleParser()
38 Json::CharReaderBuilder::strictMode(&jsonRBuilder.settings_); in HiviewRuleParser()
42 Json::Reader reader(Json::Features::strictMode()); in HiviewRuleParser()
61 void HiviewRuleParser::ParseEventTypes(const Json::Value &root) in HiviewRuleParser()
83 void HiviewRuleParser::ParseTagEvents(const Json::Value &root) in HiviewRuleParser()
102 void HiviewRuleParser::ParseEvents(const Json::Value &root) in HiviewRuleParser()
121 void HiviewRuleParser::ParseDomainRule(const Json::Value &root) in HiviewRuleParser()
146 void HiviewRuleParser::ParseDomains(const Json::Value &json, DomainRule &domainRule) in HiviewRuleParser()
148 Json::Value jsonArray; in HiviewRuleParser()
/base/hiviewdfx/hiview/utility/smart_parser/rule/
Dcompose_rule.cpp34 Json::CharReaderBuilder builder; in ParseComposeRule()
35 Json::CharReaderBuilder::strictMode(&builder.settings_); in ParseComposeRule()
38 Json::Reader reader(Json::Features::strictMode()); in ParseComposeRule()
41 Json::Value root; in ParseComposeRule()
66 void ComposeRule::ParseRule(const Json::Value& json, const string& type, vector<string>& featureIds) in ParseRule()
80 std::map<std::string, std::string> ComposeRule::GetMapFromJson(const Json::Value& json, const strin… in GetMapFromJson()
/base/security/dlp_permission_service/frameworks/common/include/
Di_json_operator.h25 using Json = nlohmann::json; variable
30 virtual Json ToJson() const = 0;
31 virtual void FromJson(const Json& jsonObject) = 0;
/base/account/os_account/services/accountmgr/test/moduletest/common/
Dbundle_manager_adapter_module_test.cpp33 using Json = nlohmann::json; typedef
280 Json testBundleInfo1 = Json {
493 Json testBundleInfo1 = Json {
501 Json testBundleInfo2 = Json {
509 Json testBundleInfo3 = Json {
542 Json testBundleInfo4 = Json {
577 Json testBundleInfo = Json {
596 Json testBundleInfo = Json {
604 Json arrays[] = {
607 Json testBundleInfo1 = Json {
[all …]
/base/account/os_account/services/accountmgr/src/osaccount/
Dos_account_file_operator.cpp40 constraintsConfig_ = Json::parse(constraintsConfigStr, nullptr, false); in Init()
47 Json constraintListCollecting = Json::parse(constraintListCollectingStr, nullptr, false); in Init()
69 Json typeJson; in GetConstraintsByType()
70 OHOS::AccountSA::GetDataByType<Json>(constraintsConfig_, in GetConstraintsByType()
88 baseOsAccountConstraintsConfig_ = Json::parse(baseUserConstraintsConfigStr, nullptr, false); in GetBaseOAConstraintsList()
108 …globalOsAccountConstraintsConfig_ = Json::parse(globalOsAccountConstraintsConfigStr, nullptr, fals… in GetGlobalOAConstraintsList()
129 …specificOsAccountConstraintsConfig_ = Json::parse(specificOsAccountConstraintsConfigStr, nullptr, … in GetSpecificOAConstraintsList()
136 Json SpecificOAConstraintsData; in GetSpecificOAConstraintsList()
137 OHOS::AccountSA::GetDataByType<Json>(specificOsAccountConstraintsConfig_, in GetSpecificOAConstraintsList()
156 OHOS::AccountSA::GetDataByType<Json>(constraintsConfig_, in GetIsMultiOsAccountEnable()
[all …]
/base/account/os_account/services/accountmgr/include/osaccount/
Dos_account_file_operator.h41 Json constraintsConfig_;
42 Json baseOsAccountConstraintsConfig_;
43 Json globalOsAccountConstraintsConfig_;
44 Json specificOsAccountConstraintsConfig_;
Dos_account_control_file_manager.h86 ErrCode GetAccountListFromFile(Json& accountListJson);
87 ErrCode SaveAccountListToFile(const Json& accountListJson);
88 ErrCode SaveAccountListToFileAndDataBase(const Json& accountListJson);
95 const std::vector<std::string>& ConstraintStr, bool isAdd, Json &globalOAConstraintsJson);
97 … const std::vector<std::string>& ConstraintStr, bool isAdd, Json& userPrivateConstraintsDataJson);
99 ErrCode GetBaseOAConstraintsFromFile(Json &baseOAConstraintsJson);
100 ErrCode GetGlobalOAConstraintsFromFile(Json &globalOAConstraintsJson);
101 ErrCode GetSpecificOAConstraintsFromFile(Json &specificOAConstraintsJson);
102 ErrCode SaveBaseOAConstraintsToFile(const Json &baseOAConstraints);
103 ErrCode SaveGlobalOAConstraintsToFile(const Json &globalOAConstraints);
[all …]
/base/account/os_account/frameworks/common/database/include/
Diaccount_info.h24 using Json = nlohmann::json; variable
28 virtual Json ToJson() const = 0;
29 virtual void FromJson(const Json &jsonObject) = 0;
44 void GetDataByType(const Json &jsonObject, const nlohmann::detail::iter_impl<const Json> &end, cons… in GetDataByType()

1234