MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_AddItemToArray

Function cJSON_AddItemToArray

common/map_sdk/transmission/src/cJSON.cpp:689–698  ·  view source on GitHub ↗

Add item to array/object. */

Source from the content-addressed store, hash-verified

687
688/* Add item to array/object. */
689void 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
700void cJSON_AddItemToArrayHead(cJSON *array, cJSON *item) {
701 cJSON *c = array->child;

Callers 3

cJSON_AddItemToObjectFunction · 0.85
AddMethod · 0.85

Calls 1

suffix_objectFunction · 0.85

Tested by

no test coverage detected