Add item to array/object. */
| 687 | |
| 688 | /* Add item to array/object. */ |
| 689 | void cJSON_AddItemToArray(cJSON *array, cJSON *item) { |
| 690 | cJSON *c = array->child; |
| 691 | if (!item) return; |
| 692 | if (!c) { |
| 693 | array->child = item; |
| 694 | } else { |
| 695 | while (c && c->next) c = c->next; |
| 696 | suffix_object(c, item); |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | void cJSON_AddItemToArrayHead(cJSON *array, cJSON *item) { |
| 701 | cJSON *c = array->child; |
no test coverage detected