Commit Graph

  • acff70b22d Update gitignore to avoid tracking unwanted files Ajay Bhargav 2015-08-12 12:53:33 +0530
  • f86b9bdfcf Merge pull request #9 from anton-sergeev/master Kevin Branigan 2015-07-27 21:33:42 -0400
  • 956129116f Support cJSON_Utils library in CMakeLists.txt Anton Sergeev 2015-07-28 03:33:17 +0600
  • 74793934ad Merge latest upstream code (r73) into github fork. Anton Sergeev 2015-07-28 03:48:06 +0600
  • 2bd1e80f6c Merge pull request #8 from anton-sergeev/master Kevin Branigan 2015-07-15 10:34:08 -0400
  • 262189428e Add CMakeLists.txt Anton Sergeev 2015-07-15 14:01:46 +0600
  • 7632993ebe Merge pull request #7 from DongwenHuang/master Kevin Branigan 2015-06-15 10:59:20 -0400
  • 10b888be54 Update cJSON.c DongwenHuang 2015-06-15 17:13:22 +0800
  • 0fd1435f4b Merge pull request #6 from DongwenHuang/master Kevin Branigan 2015-06-12 14:25:52 -0400
  • 4132e9301d Update test.c DongwenHuang 2015-06-12 12:44:42 +0800
  • 8004ed3115 Fix bug with the sort. Dave Gamble 2015-02-13 20:33:06 +0000
  • 174c62902c Since we anticipate repeated comparisons, add in a test for sorted lists, which can reduce cost for sorted objects to O(N) Dave Gamble 2015-02-13 20:31:33 +0000
  • 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. Dave Gamble 2015-02-13 19:53:27 +0000
  • c4ddd7aaa3 Correct comment and variable declaration style to be more compatible. Added cJSONUtils_SortObject for sorting the members of an object alphabetically. Dave Gamble 2015-02-13 19:19:26 +0000
  • 1d9b70e706 Fix comment style for proper ansi c compliance. Dave Gamble 2015-02-13 19:07:29 +0000
  • 9d0a4cbf2a adjust the test very slightly Dave Gamble 2015-02-11 11:34:01 +0000
  • b44a338c6d Optimise out escapable array. Dave Gamble 2015-02-11 11:31:35 +0000
  • 060e6563c0 Add more patch functionality and some more utils. Also add a new #define to cJSON.h for SetNumberValue. Dave Gamble 2015-02-11 01:29:40 +0000
  • 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. Dave Gamble 2015-02-10 14:17:59 +0000
  • 858671cc7f rework cJSONUtils_GetPointer to avoid malloc/free by using strcmp with pointer-encoding awareness. Dave Gamble 2015-02-10 12:14:59 +0000
  • c0f5e2056b add cJSON_Utils which includes JSON Pointer implementation Dave Gamble 2015-02-09 18:29:05 +0000
  • 2abfb716d1 fix formatting. Dave Gamble 2015-02-09 17:38:18 +0000
  • d9fc81e6c8 Added buffered printing methods for faster printing. Dave Gamble 2015-02-09 17:34:35 +0000
  • 70984d47e9 patch to optimise array/object printing. Dave Gamble 2015-02-09 17:28:26 +0000
  • 575724a15f optimises for number/string print Dave Gamble 2015-02-09 17:25:55 +0000
  • 2ffefcec73 Merge pull request #4 from rafaeldias/master Kevin Branigan 2015-02-03 00:31:11 -0500
  • a3eafd540d Fixed issue withh ansi (single-line comments) and updated Makefile for compiling dynamic and static lib. Rafael Leal Dias 2015-01-30 12:06:14 -0200
  • 65478ea731 Merge pull request #1 from pontillo/master Kevin Branigan 2014-05-21 11:26:06 -0400
  • cf50682983 Merge latest upstream code into github fork. Mike Pontillo 2014-05-20 20:03:20 -0700
  • 28691956a6 fix \u parser Dave Gamble 2013-08-19 14:49:06 +0000
  • c537515c17 inbuilt hex parser for unicode, which ought to be a lot faster. Dave Gamble 2013-08-14 13:20:42 +0000
  • 22e51c92f0 license file separated out :) Dave Gamble 2013-08-14 13:16:18 +0000
  • 73cc8dd1c4 cJSON_Minify (which strips comments), fixed buffer overflow const * for array creates Dave Gamble 2013-08-14 12:58:13 +0000
  • 46e3724aa8 clean up test.c Dave Gamble 2013-02-09 12:57:04 +0000
  • 15adf71272 Tidy comments. Add cJSON_SetIntValue. Dave Gamble 2013-02-09 12:56:01 +0000
  • 2c9474e9e3 fix non-explicit cast Dave Gamble 2013-02-09 12:55:11 +0000
  • 02a1e544f7 add cJSON_AddBoolToObject(). Dave Gamble 2013-02-06 12:59:21 +0000
  • 96c59f3e49 Wire in ParseWithOpts to allow detection of JSON with following garbage. Dave Gamble 2013-02-06 12:44:17 +0000
  • d755436ba7 tests for cJSON_Duplicate, so it will fail by returning 0 if anything fails to allocate Dave Gamble 2013-02-05 18:26:51 +0000
  • 927aa631b8 Added cJSON_Duplicate. With commentary Dave Gamble 2013-02-05 18:23:22 +0000
  • a7fe08778f bracket logic (to quiet a warning). Fix for potential buffer overflow printing extremely large integers. Dave Gamble 2013-02-05 17:42:42 +0000
  • 8c60f99c72 fix handling of utf16 surrogate pairs! Dave Gamble 2013-02-05 17:38:48 +0000
  • 8aa084918f Revert last patch. Simpler fix for empty arrays/objects is to handle them explicitly and then bail. Saves plenty of unnecessary state-tracking. Dave Gamble 2013-02-05 17:27:59 +0000
  • 3ddf3a5911 stable solution for printing arrays - based on patch donated by Jerome Lang. Resolves issue in case malloc(0)!=0. Dave Gamble 2013-02-05 17:14:12 +0000
  • 4678f33b5c Fix up ANSI issues. Dave Gamble 2013-02-05 17:00:31 +0000
  • fd1ac4f179 make parse_number more robust! Dave Gamble 2011-10-10 15:33:19 +0000
  • 0d268cfef7 Update to cJSON! We now support UTF-16 surrogate pairs :) Dave Gamble 2011-10-10 15:22:34 +0000
  • 65de016c38 a few more README changes Kevin Branigan 2011-08-22 00:55:11 -0400
  • b051ed05d7 updated Makefile, README and gitignore Kevin Branigan 2011-08-22 00:52:03 -0400
  • ebba183f1e updated README markdown, gitignore, added the Makefile and fixed weird comments in test.c Kevin Branigan 2011-08-22 00:47:25 -0400
  • 4cc55858fd renamed README to README.md Kevin Branigan 2011-08-22 00:44:33 -0400
  • fc0df31a18 init commit Kevin Branigan 2011-08-22 00:43:38 -0400
  • 9061b7a7e7 Fix c99 violation! Dave Gamble 2011-03-14 21:34:03 +0000
  • 15dada46b5 Fix missing cast for compilation as c++!! Dave Gamble 2011-03-07 16:35:13 +0000
  • 6a58ba5285 Include some analysis so that you can debug a failed parse. You really oughtn't go too far with this, because it's only loose information; as I've said before, cJSON +isn't+ a validating parser. But this might give you enough info to save yourself on some rare occasion ;) Dave Gamble 2011-03-02 21:22:57 +0000
  • b5d57642c2 Handle control-chars. In a certain sense, we shouldn't be seeing them, but this way we at least handle them well. Dave Gamble 2011-03-02 21:04:46 +0000
  • b5d2db4d9a print_object was calling free() rather than cJSON_free() under failure conditions! Dave Gamble 2011-03-02 19:15:06 +0000
  • 6f51f007a9 cJSON_Parse("") should return 0. Dave Gamble 2011-03-02 19:12:29 +0000
  • 02d86ef778 Update to permit compilation with gcc -ansi flag (changed all C++ // comments to C /* */ comments). Dave Gamble 2011-03-02 19:09:43 +0000
  • de7afcc458 change firstByteMark to unsigned to prevent constant overflow warning Dave Gamble 2010-02-18 10:40:37 +0000
  • 149d013543 Wrong order for variable declaration. Dave Gamble 2010-02-13 22:32:15 +0000
  • 6711153d41 CreateBool, because it's useful ;) Dave Gamble 2010-02-12 16:24:54 +0000
  • 3fb3989bb1 All memory allocations are now checked, and should fail gracefully in a low memory environment. Dave Gamble 2010-01-27 13:01:15 +0000
  • 7dd9280267 Fix handling of non-ascii characters! Many thanks to an anonymous submitter for this fix!! Dave Gamble 2010-01-23 12:44:58 +0000
  • d9840479f5 Include ctype.h for tolower() Dave Gamble 2010-01-07 23:07:58 +0000
  • ee4ce32ea8 make strcasecmp STABLE if passed a null string Dave Gamble 2010-01-01 23:13:31 +0000
  • 6420cfe7c4 solve the stricmp/strcasecmp in a dumb way for good. I might make cJSON_strcasecmp hookable, depending on what feedback i get. There are now +NO+ #ifdef/#endif WINDOWS clauses, just neat ANSI C. Also, this DOES NOT represent an efficiency hit for parsing, since the casecmp code is ONLY used for retrieval of object values, which would be after the parse stage. Dave Gamble 2009-12-09 15:43:38 +0000
  • efe33fabbb ID: 2907153 declare variable first, so we're proper c ;) Dave Gamble 2009-12-09 12:31:32 +0000
  • 37963a72b9 Don't crash if someone calls cJSON_Print(0); Dave Gamble 2009-11-26 20:17:25 +0000
  • 091c0676c1 return 0! Dave Gamble 2009-11-25 19:33:40 +0000
  • 341bb3c640 oops! remember to kill dead pointers on Detach!! Dave Gamble 2009-11-25 17:06:26 +0000
  • 79a796aed2 Detatch and Remove objects from Arrays/Objects. Dave Gamble 2009-11-25 17:04:05 +0000
  • 29b085bc5d Feature Request: 2903802. If you need to add an existing cJSON to a new object, but the existing object must not be affected by this, use cJSON_AddItemReferenceTo<Array|Object>. Dave Gamble 2009-11-25 16:52:07 +0000
  • c4e8954eb2 Feature request: 2903779. Unformatted output. :) Dave Gamble 2009-11-25 15:27:39 +0000
  • 501ff3b3d0 if it's a big number, but still an integer, print it exactly! Dave Gamble 2009-11-25 15:18:19 +0000
  • 0dbe29ffe8 fix bug 2895595 from jshvrsn whereby values outside of INT_MIN/INT_MAX range are printed incorrectly as ints. Dave Gamble 2009-11-11 00:15:53 +0000
  • 69dca155a9 comment these out for clarity... Dave Gamble 2009-11-11 00:14:51 +0000
  • 6b51f927e9 two bizarre tweaks to demonstrate the replace functionality. Dave Gamble 2009-11-10 23:51:15 +0000
  • 991b577247 fix the ReplaceObject functions; tighten them up, add some more checks for stability. Dave Gamble 2009-11-10 23:50:43 +0000
  • 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. Dave Gamble 2009-11-10 23:32:11 +0000
  • 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. Dave Gamble 2009-11-10 22:57:37 +0000
  • 37da1d2493 Fix for printing values that contain % literals. Thanks to Jimmy Tam! Dave Gamble 2009-11-06 15:41:44 +0000
  • 7ca2c994a7 incorporate hooks feature from bug 2883206 also new errorhandling for memory failure cases. +I HAVE NOT CHECKED THIS FOR ABILITY TO LEAK!+ Dave Gamble 2009-10-29 00:21:54 +0000
  • c052999a71 fix bug: 2885206, whereby memory would leak in print_object if print_value failed. Dave Gamble 2009-10-29 00:06:15 +0000
  • 75e1702659 fix bug: 2859459 (crash when printing JSON) handling of string length was incorrect. Dave Gamble 2009-10-28 23:59:05 +0000
  • 10d4ec62e0 -lm may be necessary to compile. Dave Gamble 2009-10-28 23:58:17 +0000
  • e5fe65f58a ...try that again... better WINDOWS/WIN32/__WIN32__ (for Borland C) sentinelling also missed the casts on realloc() Dave Gamble 2009-09-09 18:56:31 +0000
  • 6d50358e26 Windows/c++ support (with thanks to Ron Hall): 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 Dave Gamble 2009-09-09 10:44:00 +0000
  • 733e62f9f4 a readme of documentation. Dave Gamble 2009-08-26 04:58:08 +0000
  • 5bd220c8dc add macros. tighten code. Dave Gamble 2009-08-26 04:27:07 +0000
  • a4a4e7cbff make these PROPERLY ansi-c compliant ;) Dave Gamble 2009-08-26 03:57:15 +0000
  • 805b652e51 here it is, cJSON 1.0 Dave Gamble 2009-08-26 03:55:20 +0000