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

Function cJSON_GetArraySize

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

Get Array size/item / object item. */

Source from the content-addressed store, hash-verified

496
497/* Get Array size/item / object item. */
498ESL_DECLARE(int) cJSON_GetArraySize(cJSON *array) {cJSON *c=array->child;int i=0;while(c)i++,c=c->next;return i;}
499ESL_DECLARE(cJSON *)cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array->child; while (c && item>0) item--,c=c->next; return c;}
500ESL_DECLARE(cJSON *)cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}
501

Callers 4

esl_event_create_jsonFunction · 0.70
try_get_mi_array_paramFunction · 0.50
esl_json.hFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected