MCPcopy Create free account
hub / github.com/acl-dev/acl / cJSON_DeleteItemFromObject

Function cJSON_DeleteItemFromObject

lib_acl/samples/json/json5/cJSON.cpp:681–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679void cJSON_DeleteItemFromArray(cJSON *array,int which) {cJSON_Delete(cJSON_DetachItemFromArray(array,which));}
680cJSON *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;}
681void cJSON_DeleteItemFromObject(cJSON *object,const char *string) {cJSON_Delete(cJSON_DetachItemFromObject(object,string));}
682
683/* Replace array/object items with new ones. */
684void cJSON_InsertItemInArray(cJSON *array,int which,cJSON *newitem) {cJSON *c=array->child;while (c && which>0) c=c->next,which--;if (!c) {cJSON_AddItemToArray(array,newitem);return;}

Callers

nothing calls this directly

Calls 2

cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…