Lines Matching defs:jsonObj

23 bool IsString(const nlohmann::json &jsonObj, const std::string &key)
25 bool res = jsonObj.contains(key) && jsonObj[key].is_string() && jsonObj[key].size() <= MAX_MESSAGES_LEN;
27 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
32 bool IsUInt8(const nlohmann::json &jsonObj, const std::string &key)
34 bool res = jsonObj.contains(key) && jsonObj[key].is_number_unsigned() && jsonObj[key] <= UINT8_MAX;
36 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
41 bool IsInt32(const nlohmann::json &jsonObj, const std::string &key)
43 bool res = jsonObj.contains(key) && jsonObj[key].is_number_integer() && jsonObj[key] >= INT32_MIN &&
44 jsonObj[key] <= INT32_MAX;
46 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
51 bool IsUInt32(const nlohmann::json &jsonObj, const std::string &key)
53 bool res = jsonObj.contains(key) && jsonObj[key].is_number_unsigned() && jsonObj[key] <= UINT32_MAX;
55 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
60 bool IsInt64(const nlohmann::json &jsonObj, const std::string &key)
62 bool res = jsonObj.contains(key) && jsonObj[key].is_number_integer() && jsonObj[key] >= INT64_MIN &&
63 jsonObj[key] <= INT64_MAX;
65 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
70 bool IsUInt64(const nlohmann::json &jsonObj, const std::string &key)
72 bool res = jsonObj.contains(key) && jsonObj[key].is_number_unsigned() && jsonObj[key] <= UINT64_MAX;
74 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
79 bool IsFloat(const nlohmann::json &jsonObj, const std::string &key)
81 bool res = jsonObj.contains(key) && jsonObj[key].is_number_float();
83 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
88 bool IsArray(const nlohmann::json &jsonObj, const std::string &key)
90 bool res = jsonObj.contains(key) && jsonObj[key].is_array();
92 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());
97 bool IsBool(const nlohmann::json &jsonObj, const std::string &key)
99 bool res = jsonObj.contains(key) && jsonObj[key].is_boolean();
101 DHLOGE("the key %{public}s in jsonObj is invalid.", key.c_str());