Eric Hawicz
31a22fb2da
Issue #857 : fix a few places where json_tokener should have been returning json_tokener_error_memory but wasn't.
1 year ago
Eric Hawicz
0051f2dbe0
Merge pull request #858 from alurm/master
json_tokener.h: json_tokener_parse_verbose: fix typo
1 year ago
Alan Urmancheev
0741ce3918
json_tokener.h: json_tokener_parse_verbose: fix typo
1 year ago
Eric Hawicz
e3464a2ab4
Issue #829 : attempt to detect clang-cl.exe and pass MSVC-compatile command line arguments.
1 year ago
Eric Hawicz
61016412fb
Issue #850 : fill in & adjust the "@returns" docs for several functions.
1 year ago
Eric Hawicz
f2eac07129
doxygen can't handle html on heading, split that to separate lines
https://github.com/doxygen/doxygen/issues/10466
1 year ago
Eric Hawicz
e93ae70417
Fix issue #854 : Set error=json_tokener_error_memory in json_tokener_parser_verbose() when allocating the tokener fails.
1 year ago
Eric Hawicz
0bc2dd5e60
Merge pull request #852 from fedefrancescon/docs/micro-typo-fix
docs: micro typo in json_object_put doc
1 year ago
Federico Francescon
9c44c7ed52
docs: micro typo in json_object_get doc
1 year ago
Eric Hawicz
401249cbdf
Merge pull request #831 from neheb/1
rename WIN32 to _WIN32
1 year ago
Rosen Penev
66f7869219
rename WIN32 to _WIN32
The latter is the proper macro defined by Windows headers.
Fixes compilation under at least clang-cl which mandates function
declarations.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Eric Hawicz
dabed80523
Merge pull request #849 from rouault/random_seed_toctou
random_seed.c: add a Coverity Scan suppression
1 year ago
Even Rouault
f6c8eba84e
random_seed.c: add a Coverity Scan suppression
Coverity Scan warns about the use of open() after stat() being a
potential TOCTOU (Time of check time of use) issue. But here there is no
such issue.
1 year ago
Eric Hawicz
76f819e51d
Merge pull request #846 from evo-i/CMP0153
Use execute_process instead of exec_program
1 year ago
evo
eef983b1df
Update CMakeLists.txt
Replace with `execute_process` available on v3.0+
1 year ago
evo
c0cf4bc23b
Update CMakeLists.txt
Now saved to variable.
1 year ago
evo
e85c8ada54
Fix ECHO_OUTPUT_VARIABLE
1 year ago
evo
2c84476c77
[CMP0153]( https://cmake.org/cmake/help/latest/policy/CMP0153.html )
1 year ago
Eric Haszlakiewicz
407ddb4350
Issue #842 - fix one particular sign conversion warning.
There are many others that show up if we were to add -Wsign-conversions,
but this is the only one using a literal constant.
1 year ago
Eric Hawicz
33337523f5
Merge pull request #839 from ffontaine/master
json_pointer.c: initialize idx
1 year ago
Fabrice Fontaine
7ff7eab603
json_pointer.c: initialize idx
Fix the following build failure with gcc 5:
/home/thomas/autobuild/instance-2/output-1/build/json-c-0.17/json_pointer.c: In function 'json_pointer_result_get_recursive':
/home/thomas/autobuild/instance-2/output-1/build/json-c-0.17/json_pointer.c:193:25: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized]
res->index_in_parent = idx;
^
Fixes:
- http://autobuild.buildroot.org/results/523b35a979d59121fe4e18c38171792b06233940/
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
1 year ago
Eric Hawicz
88bce2b38e
Merge pull request #837 from HansolChoe/fix-tokener-parse-ex-fuzzer
Add type checking for parsed objects in tokener_parse_ex_fuzzer
1 year ago
HansolChoe
a907f7dd1b
tokener_parse_ex_fuzzer: add type checking for parsed object
1 year ago
Eric Hawicz
ad8b8afa7d
Take 2 fixing the placement of json_tokener_error_memory in the enum. (json_tokener_error_size is an actual error, *not* a measure of the size of the enum!)
2 years ago
Eric Hawicz
4186537557
Merge pull request #827 from robert-pang/master
Resolve build issue in tokener_parse_ex_fuzzer.c
2 years ago
Eric Hawicz
9ff6b68baf
Merge pull request #826 from emlix/cmake-policies
CMake: remove needless policy setting
2 years ago
Robert Pang
1a7defaa69
Fix variable and API names in tokener_parse_ex_fuzzer.cc to resolve build issue.
2 years ago
Rolf Eike Beer
c4a615a052
CMake: request all policies up to CMake 3.12 being set to NEW
2 years ago
Rolf Eike Beer
159822dd8a
CMake: request consistent minimum version
2 years ago
Rolf Eike Beer
990acb4e19
CMake: remove needless policy setting
These policies were all introduced before CMake 3.9, so they will automatically
be initialized to the new behavior when requesting a minimum version of 3.9.
2 years ago
Eric Haszlakiewicz
502522a93d
Update the master branch to version 0.17.99
2 years ago
Eric Hawicz
12ea386989
Add an abi-check.sh script that shows how to run the abi-compliance-checker, update release creation steps slightly.
2 years ago
Eric Haszlakiewicz
6dd8618170
Also fix messages returned from json_tokener_error_desc() (broke due to the ordering change of enum json_tokener_error)
2 years ago
Eric Hawicz
3dad6941da
Move the json_tokener_error_memory entry to the end of enum json_tokener_error to restore binary compatibility with 0.16
2 years ago
Eric Hawicz
f7e9d8e216
Update the AUTHORS file and add issues_closed_for_0.17.md for the upcoming 0.17 release
2 years ago
Eric Hawicz
85ed501a3d
Update the ChangeLog for 0.17 based on notable commits since 0.16
2 years ago
Eric Hawicz
077661f3d1
Fix issue #823 : add back json_number_chars, but only because it's part of the public API.
2 years ago
Eric Hawicz
87127d31c6
Merge pull request #679 from GitMensch/patch-1
Let json-c be used with obsolete compilers
2 years ago
Eric Hawicz
1ee12100b6
PR #679 : add workaround for old compilers w/o stdint.h (i.e. VS2008 and earlier)
2 years ago
Eric Hawicz
0bcfb6bc84
Merge pull request #822 from SSharshunov/master
Added option to disable app build
2 years ago
Sergey Sharshunov
bef40a342e
Added option to disable app build
2 years ago
Eric Hawicz
2316dbae85
Merge pull request #702 from commodo/json_patch
json_patch: add first implementation only with patch application
2 years ago
Eric Hawicz
612ba56f06
Don't export json_pointer_get_internal, move json_object_array_insert_idx and json_patch_apply to the JSONC_0.17 section in json-c.sym
2 years ago
Eric Hawicz
469bc0e4bb
Work around a somewhat misleading warning about "a function declaration without a prototype is deprecated in all versions of C" in test1.c
2 years ago
Eric Hawicz
ce3184243a
Fix json_patch_apply handling of removing the whole document (i.e. "path":"").
Enable all disabled tests, add a few more including some with null documents.
2 years ago
Eric Hawicz
9dbf2880cc
Adjust the behavior of the args passed to json_patch_apply to make it easier to do in place modifications, and add a struct json_patch_error to report more details on failures.
2 years ago
Eric Hawicz
a14a3a680c
Fix an uninitialized memory access in json_pointer.
Add comments describing when the fields of the internal struct json_pointer_get_result are valid.
2 years ago
Eric Hawicz
efc530594b
Create a json_pointer_private.h and move a few things there, fix test warnings, note array_list_insert_idx is private.
2 years ago
Alexandru Ardelean
3b8363fcdc
tests: test_json_patch: add test suite for JSON patch
Essentially, this change adds the test cases from this repo:
https://github.com/json-patch/json-patch-tests
Specifically:
https://github.com/json-patch/json-patch-tests/blob/master/spec_tests.json
https://github.com/json-patch/json-patch-tests/blob/master/tests.json
The files were taken at the date of this commit, at git hash
ea3af85790
Some tests may not have an 'expected' or 'error' field. Those are ignored.
One test was disabled manually via "disabled_in_json_c", because it tries
an impossible test, i.e. to add 2 "op" fields in the same patch entry,
something which is impossible in a JSON object.
For the 'error' cases, right now we only test that an error happens.
Later, we can extend this to check the error codes.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
4 years ago
Alexandru Ardelean
538b046884
json_patch: add first implementation only with patch application
Initially I wanted to also do a function that generates the JSON patch from
two JSON documents, but even just applying the JSON patch was a bit of
work, especially when needing to satisfy all the test-cases.
This change defines all the operation in the RFC6902. The addition isn't
too big (for the json_patch_apply() function), as part of the heavy lifting
is also done by JSON pointer logic.
All the ops were tested with the test-cases defined at:
https://github.com/json-patch/json-patch-tests
RFC6902: https://tools.ietf.org/html/rfc6902
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
4 years ago