| 2023 | } |
| 2024 | |
| 2025 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2026 | { |
| 2027 | cJSON *string_item = cJSON_CreateString(string); |
| 2028 | if (add_item_to_object(object, name, string_item, &global_hooks, false)) |
| 2029 | { |
| 2030 | return string_item; |
| 2031 | } |
| 2032 | |
| 2033 | cJSON_Delete(string_item); |
| 2034 | return NULL; |
| 2035 | } |
| 2036 | |
| 2037 | CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) |
| 2038 | { |
no test coverage detected