Commit Graph

106 Commits

Author SHA1 Message Date
Dave Gamble c4e8954eb2 Feature request: 2903779.
Unformatted output. :)



git-svn-id: http://svn.code.sf.net/p/cjson/code@19 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2009-11-25 15:27:39 +00:00
Dave Gamble b3bd706f8f prototype versions of ReplaceObject.
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
2009-11-10 23:32:11 +00:00
Dave Gamble 5cca4e2c57 simplify the rendering code so there's no 'realloc' going on.
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
2009-11-10 22:57:37 +00:00
Dave Gamble 7ca2c994a7 incorporate hooks feature from bug 2883206
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
2009-10-29 00:21:54 +00:00
Dave Gamble 5bd220c8dc add macros. tighten code.
git-svn-id: http://svn.code.sf.net/p/cjson/code@3 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2009-08-26 04:27:07 +00:00
Dave Gamble 805b652e51 here it is, cJSON 1.0
git-svn-id: http://svn.code.sf.net/p/cjson/code@1 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2009-08-26 03:55:20 +00:00