mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
reformatting: cJSON_GetObjectItem
This commit is contained in:
parent
05c2dc3c2f
commit
af44d57007
11
cJSON.c
11
cJSON.c
@ -1605,7 +1605,16 @@ cJSON *cJSON_GetArrayItem(cJSON *array, int item)
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object?object->child:0;while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}
|
cJSON *cJSON_GetObjectItem(cJSON *object, const char *string)
|
||||||
|
{
|
||||||
|
cJSON *c = object ? object->child : 0;
|
||||||
|
while (c && cJSON_strcasecmp(c->string, string))
|
||||||
|
{
|
||||||
|
c = c->next;
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
int cJSON_HasObjectItem(cJSON *object,const char *string) {return cJSON_GetObjectItem(object,string)?1:0;}
|
int cJSON_HasObjectItem(cJSON *object,const char *string) {return cJSON_GetObjectItem(object,string)?1:0;}
|
||||||
|
|
||||||
/* Utility for array list handling. */
|
/* Utility for array list handling. */
|
||||||
|
Loading…
Reference in New Issue
Block a user