mirror of
https://github.com/DaveGamble/cJSON
synced 2025-01-12 01:39:46 +00:00
a few more README changes
This commit is contained in:
parent
b051ed05d7
commit
65de016c38
@ -185,7 +185,8 @@ You'd use:
|
||||
|
||||
void parse_object(cJSON *item)
|
||||
{
|
||||
int i; for (i=0;i<cJSON_GetArraySize(item);i++)
|
||||
int i;
|
||||
for (i = 0 ; i < cJSON_GetArraySize(item) ; i++)
|
||||
{
|
||||
cJSON * subitem = cJSON_GetArrayItem(item, i);
|
||||
// handle subitem.
|
||||
@ -221,7 +222,8 @@ For instance, suppose you wanted to build an array of objects?
|
||||
|
||||
cJSON * Create_array_of_anything(cJSON ** items, int num)
|
||||
{
|
||||
int i;cJSON *prev, *root=cJSON_CreateArray();
|
||||
int i;
|
||||
cJSON * prev, * root = cJSON_CreateArray();
|
||||
for (i = 0 ; i < 24 ; i++)
|
||||
{
|
||||
if (!i) root->child = objects[i];
|
||||
|
Loading…
Reference in New Issue
Block a user