MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / cJSON_AddItemToArray

Function cJSON_AddItemToArray

modules/freeswitch/esl/src/esl_json.c:508–508  ·  view source on GitHub ↗

Add item to array/object. */

Source from the content-addressed store, hash-verified

506
507/* Add item to array/object. */
508ESL_DECLARE(void) cJSON_AddItemToArray(cJSON *array, cJSON *item) {cJSON *c=array->child;if (!item) return; if (!c) {array->child=item;} else {while (c && c->next) c=c->next; suffix_object(c,item);}}
509ESL_DECLARE(void) cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item) {if (!item) return; if (item->string) cJSON_free(item->string);item->string=cJSON_strdup(string);cJSON_AddItemToArray(object,item);}
510ESL_DECLARE(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) {cJSON_AddItemToArray(array,create_reference(item));}
511ESL_DECLARE(void) cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item) {cJSON_AddItemToObject(object,string,create_reference(item));}

Callers 13

cJSON_AddItemToObjectFunction · 0.70
esl_event_serialize_jsonFunction · 0.70
_add_mi_itemFunction · 0.50
mi_xmlrpc_get_paramFunction · 0.50
esl_json.hFile · 0.50
dm_avps2jsonFunction · 0.50
w_sip_to_jsonFunction · 0.50
mi_script_parse_requestFunction · 0.50
bson2jsonFunction · 0.50
build_pport_payload_jsonFunction · 0.50

Calls 1

suffix_objectFunction · 0.70

Tested by

no test coverage detected