Lines Matching refs:key

61 bool PtJson::Add(const char *key, bool value) const
63 ASSERT(key != nullptr && !Contains(key));
70 cJSON_bool ret = cJSON_AddItemToObject(object_, key, node);
79 bool PtJson::Add(const char *key, int32_t value) const
81 return Add(key, static_cast<double>(value));
84 bool PtJson::Add(const char *key, int64_t value) const
86 return Add(key, static_cast<double>(value));
89 bool PtJson::Add(const char *key, uint32_t value) const
91 return Add(key, static_cast<double>(value));
94 bool PtJson::Add(const char *key, double value) const
96 ASSERT(key != nullptr && !Contains(key));
103 cJSON_bool ret = cJSON_AddItemToObject(object_, key, node);
112 bool PtJson::Add(const char *key, const char *value) const
114 ASSERT(key != nullptr && !Contains(key));
121 cJSON_bool ret = cJSON_AddItemToObject(object_, key, node);
130 bool PtJson::Add(const char *key, const std::unique_ptr<PtJson> &value) const
132 ASSERT(key != nullptr && !Contains(key));
139 cJSON_bool ret = cJSON_AddItemToObject(object_, key, node);
229 bool PtJson::Remove(const char *key) const
231 ASSERT(key != nullptr && Contains(key));
233 cJSON_DeleteItemFromObject(object_, key);
237 bool PtJson::Contains(const char *key) const
239 cJSON *node = cJSON_GetObjectItemCaseSensitive(object_, key);
360 Result PtJson::GetBool(const char *key, bool *value) const
362 cJSON *item = cJSON_GetObjectItem(object_, key);
374 Result PtJson::GetInt(const char *key, int32_t *value) const
377 Result ret = GetDouble(key, &result);
384 Result PtJson::GetInt64(const char *key, int64_t *value) const
387 Result ret = GetDouble(key, &result);
394 Result PtJson::GetUInt(const char *key, uint32_t *value) const
397 Result ret = GetDouble(key, &result);
404 Result PtJson::GetUInt64(const char *key, uint64_t *value) const
407 Result ret = GetDouble(key, &result);
414 Result PtJson::GetDouble(const char *key, double *value) const
416 cJSON *item = cJSON_GetObjectItem(object_, key);
428 Result PtJson::GetString(const char *key, std::string *value) const
430 cJSON *item = cJSON_GetObjectItem(object_, key);
442 Result PtJson::GetObject(const char *key, std::unique_ptr<PtJson> *value) const
444 cJSON *item = cJSON_GetObjectItem(object_, key);
456 Result PtJson::GetArray(const char *key, std::unique_ptr<PtJson> *value) const
458 cJSON *item = cJSON_GetObjectItem(object_, key);
470 Result PtJson::GetAny(const char *key, std::unique_ptr<PtJson> *value) const
472 cJSON *item = cJSON_GetObjectItem(object_, key);