| 2155 | } |
| 2156 | |
| 2157 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2158 | { |
| 2159 | cJSON *string_item = cJSON_CreateString(string); |
| 2160 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2161 | { |
| 2162 | return string_item; |
| 2163 | } |
| 2164 | |
| 2165 | cJSON_Delete(string_item); |
| 2166 | return NULL; |
| 2167 | } |
| 2168 | |
| 2169 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2170 | { |
no test coverage detected