MCPcopy Create free account
hub / github.com/alibaba/tair / cJSON_GetArraySize

Function cJSON_GetArraySize

src/common/cJSON.c:510–510  ·  view source on GitHub ↗

Get Array size/item / object item. */

Source from the content-addressed store, hash-verified

508
509/* Get Array size/item / object item. */
510int cJSON_GetArraySize(cJSON *array) {cJSON *c=array->child;int i=0;while(c)i++,c=c->next;return i;}
511cJSON *cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array->child; while (c && item>0) item--,c=c->next; return c;}
512cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}
513

Callers 4

from_stringMethod · 0.85
from_jsonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected