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
Max Bruckner
0f98214e71
parsebuffer: type and macros
2017-04-08 17:56:24 +02:00
Max Bruckner
06a2326e3b
cJSON_ParseWithOpts: Use goto fail
2017-04-08 17:56:24 +02:00
Max Bruckner
11131b9ced
cJSON_ParseWithOptions: Improve variable names and intent
2017-04-08 17:56:24 +02:00
Max Bruckner
99db5db9a4
Release version 1.4.6
2017-04-08 17:54:55 +02:00
Max Bruckner
bb5ab5916f
Merge pull request #147 from DaveGamble/copy-paste-msvc
...
Fix copy pasting with MSVC
2017-04-08 17:26:02 +02:00
Max Bruckner
411c50f671
Don't redefine CJSON_EXPORT_SYMBOLS
2017-04-08 16:39:35 +02:00
Max Bruckner
ec2db50b6f
dllexport symbols by default and add CJSON_IMPORT_SYMBOLS
...
This should fix copy pasting of the C and header files with the MSVC
compiler.
2017-04-08 15:54:14 +02:00
Max Bruckner
74d0525201
Merge pull request #146 from DaveGamble/locale-independence
...
Locale independence
2017-04-08 14:46:22 +02:00
Max Bruckner
3efef58c32
README: Add setlocale to caveats
2017-04-08 03:50:22 +02:00
Max Bruckner
65541b900c
Update space requirements of cJSON_PrintPreallocated
2017-04-08 03:42:44 +02:00
Max Bruckner
c08f7e1d29
print_number: Make locale independent
...
This first prints the number into a temporary buffer and then copies the
number to the output.
A positive side effect is that cJSON no longer reserves more space for
the number in the output than is necessary.
2017-04-08 03:38:49 +02:00