| 2037 | } |
| 2038 | |
| 2039 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2040 | { |
| 2041 | cJSON *string_item = cJSON_CreateString(string); |
| 2042 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2043 | { |
| 2044 | return string_item; |
| 2045 | } |
| 2046 | |
| 2047 | cJSON_Delete(string_item); |
| 2048 | return NULL; |
| 2049 | } |
| 2050 | |
| 2051 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2052 | { |
nothing calls this directly
no test coverage detected