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

Function cJSON_CreateArray

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

Source from the content-addressed store, hash-verified

534ESL_DECLARE(cJSON *)cJSON_CreateNumber(double num) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_Number;item->valuedouble=num;item->valueint=(int)num;}return item;}
535ESL_DECLARE(cJSON *)cJSON_CreateString(const char *string) {cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_String;item->valuestring=cJSON_strdup(string);}return item;}
536ESL_DECLARE(cJSON *)cJSON_CreateArray(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;}
537ESL_DECLARE(cJSON *)cJSON_CreateObject(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;}
538
539/* Create Arrays: */

Callers 15

cJSON_CreateIntArrayFunction · 0.70
cJSON_CreateFloatArrayFunction · 0.70
cJSON_CreateDoubleArrayFunction · 0.70
cJSON_CreateStringArrayFunction · 0.70
esl_event_serialize_jsonFunction · 0.70
_init_mi_resultFunction · 0.50
_add_mi_itemFunction · 0.50
mi_xmlrpc_parse_paramsFunction · 0.50
dm_avps2jsonFunction · 0.50
dm_receive_reqFunction · 0.50
dm_receive_msgFunction · 0.50

Calls 1

cJSON_New_ItemFunction · 0.70

Tested by

no test coverage detected