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

Function cJSON_DeleteItemFromObject

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

Source from the content-addressed store, hash-verified

519ESL_DECLARE(void) cJSON_DeleteItemFromArray(cJSON *array,int which) {cJSON_Delete(cJSON_DetachItemFromArray(array,which));}
520ESL_DECLARE(cJSON *)cJSON_DetachItemFromObject(cJSON *object,const char *string) {int i=0;cJSON *c=object->child;while (c && cJSON_strcasecmp(c->string,string)) i++,c=c->next;if (c) return cJSON_DetachItemFromArray(object,i);return 0;}
521ESL_DECLARE(void) cJSON_DeleteItemFromObject(cJSON *object,const char *string) {cJSON_Delete(cJSON_DetachItemFromObject(object,string));}
522
523/* Replace array/object items with new ones. */
524ESL_DECLARE(void) cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) return;

Callers 1

free_shm_mi_responseFunction · 0.50

Calls 2

cJSON_DeleteFunction · 0.70

Tested by

no test coverage detected