| 2208 | } |
| 2209 | |
| 2210 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2211 | { |
| 2212 | cJSON *string_item = cJSON_CreateString(string); |
| 2213 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2214 | { |
| 2215 | return string_item; |
| 2216 | } |
| 2217 | |
| 2218 | cJSON_Delete(string_item); |
| 2219 | return NULL; |
| 2220 | } |
| 2221 | |
| 2222 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2223 | { |
nothing calls this directly
no test coverage detected