Browse Source

comment these out for clarity...

git-svn-id: http://svn.code.sf.net/p/cjson/code@16 e3330c51-1366-4df0-8b21-3ccf24e3d50e
pull/4/head
Dave Gamble 15 years ago
parent
commit
69dca155a9
  1. 4
      test.c

4
test.c

@ -78,7 +78,7 @@ void create_objects()
root=cJSON_CreateArray(); root=cJSON_CreateArray();
for (i=0;i<3;i++) cJSON_AddItemToArray(root,cJSON_CreateIntArray(numbers[i],3)); for (i=0;i<3;i++) cJSON_AddItemToArray(root,cJSON_CreateIntArray(numbers[i],3));
cJSON_ReplaceItemInArray(root,1,cJSON_CreateString("Replacement")); // cJSON_ReplaceItemInArray(root,1,cJSON_CreateString("Replacement"));
out=cJSON_Print(root); cJSON_Delete(root); printf("%s\n",out); free(out); out=cJSON_Print(root); cJSON_Delete(root); printf("%s\n",out); free(out);
@ -117,7 +117,7 @@ void create_objects()
cJSON_AddStringToObject(fld, "Country", fields[i].country); cJSON_AddStringToObject(fld, "Country", fields[i].country);
} }
cJSON_ReplaceItemInObject(cJSON_GetArrayItem(root,1),"City",cJSON_CreateIntArray(ids,4)); // cJSON_ReplaceItemInObject(cJSON_GetArrayItem(root,1),"City",cJSON_CreateIntArray(ids,4));
out=cJSON_Print(root); cJSON_Delete(root); printf("%s\n",out); free(out); out=cJSON_Print(root); cJSON_Delete(root); printf("%s\n",out); free(out);

Loading…
Cancel
Save