| 711 | } |
| 712 | |
| 713 | void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) { |
| 714 | if (!item) return; |
| 715 | if (item->string) cJSON_free(item->string); |
| 716 | item->string = cJSON_strdup(string); |
| 717 | cJSON_AddItemToArray(object, item); |
| 718 | } |
| 719 | void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) { cJSON_AddItemToArray(array, create_reference(item)); } |
| 720 | void cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item) { |
| 721 | cJSON_AddItemToObject(object, string, create_reference(item)); |
no test coverage detected