| 2029 | } |
| 2030 | |
| 2031 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2032 | { |
| 2033 | cJSON *string_item = cJSON_CreateString(string); |
| 2034 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2035 | { |
| 2036 | return string_item; |
| 2037 | } |
| 2038 | |
| 2039 | cJSON_Delete(string_item); |
| 2040 | return NULL; |
| 2041 | } |
| 2042 | |
| 2043 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2044 | { |
no test coverage detected