| 879 | } |
| 880 | |
| 881 | void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) |
| 882 | { |
| 883 | if (!item) |
| 884 | return; |
| 885 | if (item->string) |
| 886 | cJSON_free(item->string); |
| 887 | item->string = cJSON_strdup(string); |
| 888 | cJSON_AddItemToArray(object, item); |
| 889 | } |
| 890 | void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) |
| 891 | { |
| 892 | cJSON_AddItemToArray(array, create_reference(item)); |
no test coverage detected