Commit Graph

12 Commits

Author SHA1 Message Date
Stephan Gatzka
7ed067e680 Rename some variables to avoid shadowing. 2016-11-27 18:16:28 +01:00
Max Bruckner
65ac0a1a2b cJSON_Utils tests: fix formatting 2016-11-19 17:50:01 +07:00
Max Bruckner
b88da9b0de Initialize all variables 2016-11-19 17:29:21 +07:00
Max Bruckner
9e31049159 test and test_utils: Make compliant with ANSI C 2016-11-08 00:57:58 +07:00
Dave Gamble
3a7bd6924a Utility function to generate the patch between two objects. 2016-05-29 18:16:19 +01:00
Dave Gamble
e79fa9472b cJSONUtils_MergePatch with tests from the RFC. 2016-05-29 17:39:54 +01:00
Max Bruckner
58bc383b28 fix memory leaks 2015-10-14 11:02:56 +02:00
Dave Gamble
491cf029b2 Rework cJSON_Utils object compare functions to use an O(N) algorithm on sorted lists.
It's a bit of a shame to use the sorts, because cJSON is otherwise incredibly stable (json->cJSON->json is unmodified modulo formatting),
but it means we get usable performance, rather than O(N^2) which will make CPUs cry.


git-svn-id: svn://svn.code.sf.net/p/cjson/code@71 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2015-02-13 19:53:27 +00:00
Dave Gamble
c4ddd7aaa3 Correct comment and variable declaration style to be more compatible. Added cJSONUtils_SortObject for sorting the members of an object alphabetically.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@70 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2015-02-13 19:19:26 +00:00
Dave Gamble
060e6563c0 Add more patch functionality and some more utils.
Also add a new #define to cJSON.h for SetNumberValue.


git-svn-id: svn://svn.code.sf.net/p/cjson/code@66 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2015-02-11 01:29:40 +00:00
Dave Gamble
3c6b3cc617 start of JSON Patch implementation. cJSON gained a cJSON_InsertItemToArray which pushes elements up by one.
This is needed for JSON Patch. Everything but Test is implemented for ApplyPatches.


git-svn-id: svn://svn.code.sf.net/p/cjson/code@65 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2015-02-10 14:17:59 +00:00
Dave Gamble
c0f5e2056b add cJSON_Utils which includes JSON Pointer implementation
git-svn-id: svn://svn.code.sf.net/p/cjson/code@63 e3330c51-1366-4df0-8b21-3ccf24e3d50e
2015-02-09 18:29:05 +00:00