Kyle Chisholm
23dafa4739
added Print function call for pre-allocated buffer
8 years ago
Stephan
038b04d80a
Take out len from condition check.
Otherwise, the check is just undefined behaviour. gcc even takes out
this check because len can never be zero if len does not wrap around.
Found with -Wstrict-overflow=2
8 years ago
Max Bruckner
23b269d5f9
Rename bool -> cjbool, fix #71
8 years ago
Max Bruckner
679004914f
Define a boolean type
This is not changing the behavior of the code, but it is improving the
readability and helps to make the intention clearer.
One thing to take care: 'true' should never be compared against.
8 years ago
Max Bruckner
b88da9b0de
Initialize all variables
8 years ago
Max Bruckner
a5ff796c20
Replace 0 with more expressive NULL or '\0'
8 years ago
Max Bruckner
dc4b62915a
fix #10 , now failing on incorrect escape sequences
8 years ago
Max Bruckner
afd690d1c9
format fix
8 years ago
Jiri Zouhar
06008b0444
add support to insert raw json
8 years ago
Max Bruckner
0d10e279c8
fix #55 memory leak in cJSON_ReplaceItemInObject
8 years ago
Max Bruckner
a148520ffb
Revert "Fix #26 : Use long double literal for 1e60"
This reverts commit 3ea491c0a6
.
8 years ago
Max Bruckner
b4d728d018
pow2gt: Detect integer size fix #27
8 years ago
Max Bruckner
3ea491c0a6
Fix #26 : Use long double literal for 1e60
Big thanks at mvollmer (https://sourceforge.net/p/cjson/bugs/45/ )
8 years ago
Rod Vagg
5323f558cd
don't ignore malloc failure in cJSON_PrintBuffered
8 years ago
Max Bruckner
ddeca82718
reformatting: cJSON.c: fix indentation
8 years ago
Jonathan Fether
9f00ff9a91
Remove redundant test from cJSON_AddItemToArray
The test for whether "c" is null is redundant. Since this is the else case of "(!c)", and the only way "c" is changed is by the instruction assigning it "c->next" on the condition here, simply verifying that "c->next" isn't null is sufficient.
8 years ago
Ian Mobley
d4836effc9
Fix compiler warning "array subscript has type char" when using arm-none-eabi-gcc
8 years ago
Ian Mobley
b393b3beeb
Add const qualifier for non-destructive functions
Functions like cJSON_Print do not and should not modify the object passed
to them.
8 years ago
Max Bruckner
34388c2d4c
reformatting: cJSON_Minify
8 years ago
Max Bruckner
9adc6e7fe1
reformatting: cJSON_Duplicate
8 years ago
Max Bruckner
e6fd236f00
reformatting: cJSON_CreateStringArray
8 years ago
Max Bruckner
e272f7285e
reformatting: cJSON_CreateDoubleArray
8 years ago
Max Bruckner
890b999e59
reformatting cJSON_CreateFloatArray
8 years ago
Max Bruckner
f831aef5c1
reformatting: cJSON_CreateIntArray
8 years ago
Max Bruckner
21a0a88f19
reformatting: cJSON_CreateObject
8 years ago
Max Bruckner
e241081020
reformatting: cJSON_CreateArray
8 years ago
Max Bruckner
034003ce2b
reformatting: cJSON_CreateString
8 years ago
Max Bruckner
3f9f4970b4
reformatting: cJSON_CreateNumber
8 years ago
Max Bruckner
99f61f2b35
reformatting: cJSON_CreateBool
8 years ago
Max Bruckner
a0b5d6b13a
reformatting: cJSON_CreateFalse
8 years ago
Max Bruckner
fdfb9fff86
reformatting: cJSON_CreateTrue
8 years ago
Max Bruckner
cf7835b67d
reformatting: cJSON_CreateNull
8 years ago
Max Bruckner
3a8043273e
reformatting: cJSON_ReplaceItemInObject
8 years ago
Max Bruckner
dc8eb30467
reformatting: cJSON_ReplaceItemInArray
8 years ago
Max Bruckner
69dcfcf238
reformatting: cJSON_InsertItemInArray
8 years ago
Max Bruckner
207bb05e8c
reformatting: cJSON_DeleteItemFromObject
8 years ago
Max Bruckner
96ec74c9d5
reformatting: cJSON_DetachItemFromObject
8 years ago
Max Bruckner
6e5063f9cc
reformatting: cJSON_DeleteItemFromArray
8 years ago
Max Bruckner
c636621779
reformatting: cJSON_DetachItemFromArray
8 years ago
Max Bruckner
b602ef1cd5
reformatting: cJSON_AddItemReferenceToObject
8 years ago
Max Bruckner
55e33d7100
reformatting: cJSON_AddItemReferenceToArray
8 years ago
Max Bruckner
b55120eeb2
reformatting: cJSON_AddItemToObjectCS
8 years ago
Max Bruckner
196885ad93
reformatting: cJSON_AddItemToObject
8 years ago
Max Bruckner
c26f9b918d
reformatting: cJSON_AddItemToArray
8 years ago
Max Bruckner
09545c0eb2
reformatting: create_reference
8 years ago
Max Bruckner
17e13946fe
reformatting: cJSON_HasObjectItem
8 years ago
Max Bruckner
af44d57007
reformatting: cJSON_GetObjectItem
8 years ago
Max Bruckner
05c2dc3c2f
reformatting: cJSON_GetArrayItem
8 years ago
Max Bruckner
4fdb6499f0
reformatting: cJSON_GetArraySize
8 years ago
Max Bruckner
31e53a1297
reformatting: print_object
8 years ago