Kevin Branigan
11fb0d0215
Merge pull request #15 from dieyushi/master
add new macro for iterating over an array
9 years ago
Kevin Branigan
1e1de63244
Merge pull request #13 from rmeertens/master
added cJSON_HasObjectItem
9 years ago
Kevin Branigan
11b8c97f41
Merge pull request #17 from Scypho/master
Handle invalid numbers
9 years ago
Linus Wallgren
e4b96fa820
Handle invalid numbers
Previously cJSON generated invalid JSON when a number was infinite or
similar. This patch changes the behaviour to match javascript, that is
to render such a number as null.
9 years ago
IvanVoid
0b807e21a4
README.md: fixed formatting
9 years ago
root
0da343068e
add new macro for iterating over an array
9 years ago
Roland Meertens
b175877d8b
+usefull function
9 years ago
Kevin Branigan
affedd65ba
Merge pull request #11 from etodd/win-math-lib-fix
Remove "m" library dependency on Windows.
9 years ago
Evan Todd
ebd06067a4
Remove "m" library dependency on Windows.
9 years ago
Kevin Branigan
a819694712
Merge pull request #10 from ajaybhargav/master
Update gitignore to avoid tracking unwanted files
9 years ago
Ajay Bhargav
acff70b22d
Update gitignore to avoid tracking unwanted files
.gitignore updated to avoid tracking files generated after build. Following list
of files are added:
*.o
*.a
*.so
*.swp
*.patch
tags
Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
9 years ago
Kevin Branigan
f86b9bdfcf
Merge pull request #9 from anton-sergeev/master
Merge latest upstream code (svn rev. 73) into github fork
9 years ago
Anton Sergeev
956129116f
Support cJSON_Utils library in CMakeLists.txt
Signed-off-by: Anton Sergeev <Anton.Sergeev@elecard.ru>
9 years ago
Anton Sergeev
74793934ad
Merge latest upstream code (r73) into github fork.
Signed-off-by: Anton Sergeev <Anton.Sergeev@elecard.ru>
Conflicts:
cJSON.c
test.c
9 years ago
Kevin Branigan
2bd1e80f6c
Merge pull request #8 from anton-sergeev/master
Add CMakeLists.txt
9 years ago
Anton Sergeev
262189428e
Add CMakeLists.txt
Signed-off-by: Anton Sergeev <Anton.Sergeev@elecard.ru>
9 years ago
Kevin Branigan
7632993ebe
Merge pull request #7 from DongwenHuang/master
Update cJSON.c
10 years ago
DongwenHuang
10b888be54
Update cJSON.c
10 years ago
Kevin Branigan
0fd1435f4b
Merge pull request #6 from DongwenHuang/master
Update test.c
10 years ago
DongwenHuang
4132e9301d
Update test.c
10 years ago
Dave Gamble
8004ed3115
Fix bug with the sort.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@73 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Dave Gamble
174c62902c
Since we anticipate repeated comparisons, add in a test for sorted lists, which can reduce
cost for sorted objects to O(N)
git-svn-id: svn://svn.code.sf.net/p/cjson/code@72 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
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
10 years ago
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
10 years ago
Dave Gamble
1d9b70e706
Fix comment style for proper ansi c compliance.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@69 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Dave Gamble
9d0a4cbf2a
adjust the test very slightly
git-svn-id: svn://svn.code.sf.net/p/cjson/code@68 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Dave Gamble
b44a338c6d
Optimise out escapable array.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@67 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
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
10 years ago
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
10 years ago
Dave Gamble
858671cc7f
rework cJSONUtils_GetPointer to avoid malloc/free by using strcmp with pointer-encoding awareness.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@64 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
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
10 years ago
Dave Gamble
2abfb716d1
fix formatting.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@62 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Dave Gamble
d9fc81e6c8
Added buffered printing methods for faster printing.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@61 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Dave Gamble
70984d47e9
patch to optimise array/object printing.
git-svn-id: svn://svn.code.sf.net/p/cjson/code@60 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Dave Gamble
575724a15f
optimises for number/string print
git-svn-id: svn://svn.code.sf.net/p/cjson/code@59 e3330c51-1366-4df0-8b21-3ccf24e3d50e
10 years ago
Kevin Branigan
2ffefcec73
Merge pull request #4 from rafaeldias/master
Fixed issue with ansi (single-line comments) and updated Makefile for compiling dynamic and static lib.
10 years ago
Rafael Leal Dias
a3eafd540d
Fixed issue withh ansi (single-line comments) and updated Makefile for compiling dynamic and static lib.
10 years ago
Kevin Branigan
65478ea731
Merge pull request #1 from pontillo/master
Merge latest upstream code into github fork
11 years ago
Mike Pontillo
cf50682983
Merge latest upstream code into github fork.
Conflicts:
cJSON.c
cJSON.h
test.c
11 years ago
Dave Gamble
28691956a6
fix \u parser
git-svn-id: http://svn.code.sf.net/p/cjson/code@58 e3330c51-1366-4df0-8b21-3ccf24e3d50e
11 years ago
Dave Gamble
c537515c17
inbuilt hex parser for unicode, which ought to be a lot faster.
git-svn-id: http://svn.code.sf.net/p/cjson/code@57 e3330c51-1366-4df0-8b21-3ccf24e3d50e
11 years ago
Dave Gamble
22e51c92f0
license file separated out :)
git-svn-id: http://svn.code.sf.net/p/cjson/code@56 e3330c51-1366-4df0-8b21-3ccf24e3d50e
11 years ago
Dave Gamble
73cc8dd1c4
cJSON_Minify (which strips comments),
fixed buffer overflow
const * for array creates
git-svn-id: http://svn.code.sf.net/p/cjson/code@55 e3330c51-1366-4df0-8b21-3ccf24e3d50e
11 years ago
Dave Gamble
46e3724aa8
clean up test.c
git-svn-id: http://svn.code.sf.net/p/cjson/code@54 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago
Dave Gamble
15adf71272
Tidy comments. Add cJSON_SetIntValue.
git-svn-id: http://svn.code.sf.net/p/cjson/code@53 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago
Dave Gamble
2c9474e9e3
fix non-explicit cast
git-svn-id: http://svn.code.sf.net/p/cjson/code@52 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago
Dave Gamble
02a1e544f7
add cJSON_AddBoolToObject().
git-svn-id: http://svn.code.sf.net/p/cjson/code@51 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago
Dave Gamble
96c59f3e49
Wire in ParseWithOpts to allow detection of JSON with following garbage.
git-svn-id: http://svn.code.sf.net/p/cjson/code@50 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago
Dave Gamble
d755436ba7
tests for cJSON_Duplicate, so it will fail by returning 0 if anything fails to allocate
git-svn-id: http://svn.code.sf.net/p/cjson/code@49 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago
Dave Gamble
927aa631b8
Added cJSON_Duplicate. With commentary
git-svn-id: http://svn.code.sf.net/p/cjson/code@48 e3330c51-1366-4df0-8b21-3ccf24e3d50e
12 years ago