| 2193 | } |
| 2194 | |
| 2195 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2196 | { |
| 2197 | cJSON *string_item = cJSON_CreateString(string); |
| 2198 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2199 | { |
| 2200 | return string_item; |
| 2201 | } |
| 2202 | |
| 2203 | cJSON_Delete(string_item); |
| 2204 | return NULL; |
| 2205 | } |
| 2206 | |
| 2207 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2208 | { |
searching dependent graphs…