| 885 | } |
| 886 | |
| 887 | void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) |
| 888 | { |
| 889 | if (!item) |
| 890 | return; |
| 891 | if (item->string) |
| 892 | cJSON_free(item->string); |
| 893 | item->string = cJSON_strdup(string); |
| 894 | cJSON_AddItemToArray(object, item); |
| 895 | } |
| 896 | void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) |
| 897 | { |
| 898 | cJSON_AddItemToArray(array, create_reference(item)); |
no test coverage detected