| 2133 | } |
| 2134 | |
| 2135 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2136 | { |
| 2137 | cJSON *string_item = cJSON_CreateString(string); |
| 2138 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2139 | { |
| 2140 | return string_item; |
| 2141 | } |
| 2142 | |
| 2143 | cJSON_Delete(string_item); |
| 2144 | return NULL; |
| 2145 | } |
| 2146 | |
| 2147 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2148 | { |
nothing calls this directly
no test coverage detected