Based on an idea from Daniel Harcek; these are designed to allow you to replace entries in an object or array with new
values. The old values get deleted and the new ones are wired into place.
This leads to a structure like this:
cJSON_ReplaceItemInObject(myobject, "spooncount", cJSON_CreateNumber(24));
cJSON +NEVER+ type checks, so it's perfectly legal to replace an object with a string (to cJSON) though it may not be in your schema!
git-svn-id: http://svn.code.sf.net/p/cjson/code@13 e3330c51-1366-4df0-8b21-3ccf24e3d50e
That seemed horribly inefficient to me.
Now we use multiple passes and can test for failure more carefully.
git-svn-id: http://svn.code.sf.net/p/cjson/code@12 e3330c51-1366-4df0-8b21-3ccf24e3d50e
also new errorhandling for memory failure cases. +I HAVE NOT CHECKED THIS FOR ABILITY TO LEAK!+
git-svn-id: http://svn.code.sf.net/p/cjson/code@10 e3330c51-1366-4df0-8b21-3ccf24e3d50e
added strcasecmp->stricmp
added (char*) casts to all mallocs (as reqd by c++)
added skip(value) to cJSON_Parse to allow for whitespace before the actual data
git-svn-id: http://svn.code.sf.net/p/cjson/code@5 e3330c51-1366-4df0-8b21-3ccf24e3d50e