1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-23 23:22:09 +00:00
Commit Graph

617 Commits

Author SHA1 Message Date
Debora Grosse
a69ad22639 Remove test for negative zero, as -0 is acceptable output 2017-04-29 13:08:10 -04:00
Debora Grosse
3fc9bc0648 cJSON: Fix print_number to print significant digits of doubles 2017-04-20 10:55:09 -04:00
Max Bruckner
6ccfd5d603 tests: Move most of test_utils.c to old_utils_tests 2017-04-18 14:11:14 +02:00
Max Bruckner
49ebc85e7a Move ApplyPatch tests from test_utils.c to json. 2017-04-13 20:15:25 +02:00
Max Bruckner
8fd46d51b1 Put generated files in library_config subdirectory 2017-04-12 21:49:36 +02:00
Max Bruckner
609bb75421 cJSON_Utils: Use cJSON_free and cJSON_malloc 2017-04-12 21:28:31 +02:00
Max Bruckner
b759ff38b8 Merge pull request #150 from DaveGamble/json-patch-tests
Add json-patch/json-patch-tests for testing JSON patch implementation
2017-04-12 20:54:18 +02:00
Max Bruckner
ba7b48b3f3 Enable json-patch-tests tests 2017-04-12 20:50:04 +02:00
Max Bruckner
134ebf5e89 cJSONUtils_ApplyPatches: Handle replacement of root 2017-04-12 20:50:04 +02:00
Max Bruckner
02a05eea4e cJSON: Add cJSON_malloc and cJSON_free 2017-04-12 20:50:03 +02:00
Max Bruckner
d67b008d4b decode_array_index_from_pointer: parse manually
This allows checking for leading zeroes and invalid characters after the index
2017-04-12 12:06:27 +02:00
Max Bruckner
c66342d871 cJSON_Utils: Use enum for opcode 2017-04-12 11:36:14 +02:00
Max Bruckner
c960b2b853 cJSON_Utils: Fix size_t support of cJSONUtils_GetPointer 2017-04-12 11:21:48 +02:00
Max Bruckner
3056d85f01 cJSON_Utils: Use new helper function 2017-04-12 11:21:21 +02:00
Max Bruckner
b470d918f3 cJSONUtils: add decode_array_index_from_pointer as common helper function 2017-04-12 11:07:21 +02:00
Max Bruckner
8efb287ae2 cJSONUtils_ApplyPatches: Fail if removal failed 2017-04-12 10:44:29 +02:00
Max Bruckner
a1602f484b cJSONUtils_ApplyPatches: Don't accept invalid array indices 2017-04-12 10:34:15 +02:00
Max Bruckner
d058a9cd8f cJSON_ApplyPatches: Don't allow adding to array out of bounds 2017-04-11 17:40:43 +02:00
Max Bruckner
62ba68fc7d cJSONUtils_ApplyPatches: Fix not accepting arrays
This was completely broken, arrays weren't accepted.
2017-04-11 16:38:51 +02:00
Max Bruckner
8c900b9e07 Merge commit '7276f4df051bc58af8a2da7d3199517d43d37582' as 'tests/json-patch-tests' 2017-04-11 14:45:28 +02:00
Max Bruckner
7276f4df05 Squashed 'tests/json-patch-tests/' content from commit 716417e
git-subtree-dir: tests/json-patch-tests
git-subtree-split: 716417e71e328e116dc1e98b903b434578bc1a1c
2017-04-11 14:45:28 +02:00
Max Bruckner
e0a3c2370d Merge pull request #148 from DaveGamble/cjson-compare
cJSON_Compare
2017-04-11 14:37:15 +02:00
Max Bruckner
6ac896d8d2 cJSON_Compare: New function to compare json 2017-04-08 17:57:36 +02:00
Max Bruckner
2a25abbf2a Deduplicate code for cJSON_GetObjectItem 2017-04-08 17:57:36 +02:00
Max Bruckner
e9803341d5 simplify and rename cJSON_strcasecmp
Two NULL strings should not be considered equal for the purpose of
cJSON.
2017-04-08 17:57:36 +02:00
Max Bruckner
31400affab Contributors: Add Pawel Winogrodzki 2017-04-08 17:56:30 +02:00
Max Bruckner
6c3df7eb59 cJSON_ParseWithOpts: Fix -Wmissing-field-initializers 2017-04-08 17:56:30 +02:00
Max Bruckner
a99d254e4f License: Add other contributors 2017-04-08 17:56:29 +02:00
Max Bruckner
f0230a584f Merge pull request #139 from PawelWMS/develop_W4_fixes
Fixing all /W4 level warnings.
2017-04-08 17:56:29 +02:00
Pawel Winogrodzki
2148e3277a Renaming "min" to "cjson_min". 2017-04-08 17:56:29 +02:00
Pawel Winogrodzki
c786cd9714 Adding back "const". 2017-04-08 17:56:29 +02:00
Pawel Winogrodzki
238ceec175 Fixing all W4-level warnings. 2017-04-08 17:56:29 +02:00
Max Bruckner
6702037b68 cJSON_Delete: Improve readability 2017-04-08 17:56:28 +02:00
Max Bruckner
eb5000ba61 cJSON_strdup: improve readability 2017-04-08 17:56:28 +02:00
Max Bruckner
655c26ada1 cJSON_strcasecmp: Improve readability 2017-04-08 17:56:28 +02:00
Max Bruckner
218b0c8dcf cJSON_Print: Use reallocate if available
This can reduce worst case peak memory usage by 30% depending on the
realloc implementation.
2017-04-08 17:56:28 +02:00
Max Bruckner
281df6997c Update copyright 2017-04-08 17:56:27 +02:00
Max Bruckner
bc0bb7c224 parse_with_opts: test return_parse_end 2017-04-08 17:56:27 +02:00
Max Bruckner
56a32f9ecc Use error_position instead of error pointer internally 2017-04-08 17:56:27 +02:00
Max Bruckner
770e8263a5 tests for cJSON_ParseWithOpts 2017-04-08 17:56:27 +02:00
Max Bruckner
2683589d93 parser: Construct error pointer from buffer offset 2017-04-08 17:56:26 +02:00
Max Bruckner
c837177a56 utf16_literal_to_utf8: Support \u0000 2017-04-08 17:56:26 +02:00
Max Bruckner
80bc7652ae cJSON_ParseWithOptions: Remove end pointer 2017-04-08 17:56:26 +02:00
Max Bruckner
87a204ed0b parse_functions: Return booleans instead of pointers 2017-04-08 17:56:26 +02:00
Max Bruckner
c9739c59fd Replace strchr with switch case
This should improve performance and improve readability.
2017-04-08 17:56:25 +02:00
Max Bruckner
778a0c146f parse_string: Use parsebuffer 2017-04-08 17:56:25 +02:00
Max Bruckner
f69b109c9f parse_number: Use parse_buffer 2017-04-08 17:56:25 +02:00
Max Bruckner
fef1c45b92 parse_object: Use parse_buffer 2017-04-08 17:56:25 +02:00
Max Bruckner
033a542532 parse_array: Use parsebuffer 2017-04-08 17:56:25 +02:00
Max Bruckner
fd0320cf54 parse_value: Use parse_buffer 2017-04-08 17:56:24 +02:00