Lines Matching defs:json
44 void GetJsonData(cJSON *json, const std::string &key, std::string &val)
46 if (!cJSON_IsObject(json)) {
47 MMI_HILOGE("The json is not object");
50 if (cJSON_HasObjectItem(json, key.c_str())) {
51 cJSON* rawValue = cJSON_GetObjectItem(json, key.c_str());
60 void GetJsonData(cJSON *json, const std::string &key, T &val)
62 if (!cJSON_IsObject(json)) {
63 MMI_HILOGE("The json is not object");
66 if (cJSON_HasObjectItem(json, key.c_str())) {
67 cJSON* rawNum = cJSON_GetObjectItem(json, key.c_str());
75 void GetJsonData(cJSON *json, const std::string& key, std::vector<int32_t>& vals)
77 if (!cJSON_IsObject(json)) {
78 MMI_HILOGE("The json is not object");
81 if (!cJSON_HasObjectItem(json, key.c_str())) {
82 MMI_HILOGE("The json is not data:%{public}s", key.c_str());
85 cJSON* rawVal = cJSON_GetObjectItem(json, key.c_str());