]>
git.ipfire.org Git - thirdparty/json-c.git/log
Eric Hawicz [Mon, 27 Oct 2025 20:00:37 +0000 (16:00 -0400)]
Merge pull request #899 from Seagate/meson_support
Meson support
Tyler Erickson [Mon, 27 Oct 2025 18:13:23 +0000 (12:13 -0600)]
Merge branch 'json-c:master' into meson_support
Eric Hawicz [Sat, 25 Oct 2025 13:46:22 +0000 (09:46 -0400)]
Merge pull request #898 from Seagate/fix_cmake_clangcl
bug: Fixing Cmake build when using clang-cl
Eric Hawicz [Sat, 25 Oct 2025 13:45:50 +0000 (09:45 -0400)]
Merge pull request #895 from nim65s/patch-1
CMake: sync minimum version
Tyler Erickson [Fri, 24 Oct 2025 15:48:56 +0000 (09:48 -0600)]
Removing werror option as meson has a built-in option for this
Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
Tyler Erickson [Mon, 20 Oct 2025 18:10:57 +0000 (12:10 -0600)]
bug: Fixing runtime issue with test_util_file.c in Windows
Windows was failing tests due to how the Windows API works with some of the calls used.
When opening and reading a file O_BINARY is needed otherwise it fails for size checks. This is due to how Windows handles newlines and counts between text and binary mode file reads.
Also fixed is the test for /dev/null.
In Windows, this fails, but crashes due to a missing return statement when it cannot open this file.
I also tried telling windows to open the special file NUL, however that leads to a CRT crash later in the test that cannot be stopped and will always fail. Rather than fail a test that Windows will always fail, it has been disabled in that specific case.
Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
Tyler Erickson [Mon, 20 Oct 2025 18:08:01 +0000 (12:08 -0600)]
make: Adding support for building json-c with meson
Adding meson build files for json-c that work similarly to the cmake build files.
Where it made sense, I reused existing cmake .h.in files or generated entirely from meson.
All tests were done with GCC and Clang in ubuntu 24.04, Windows using MSVC 2022 and Clang-cl from llvm's repo using version 21.1.3
Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
Tyler Erickson [Mon, 20 Oct 2025 17:39:04 +0000 (11:39 -0600)]
bug: Fixing Cmake build when using clang-cl
Clang-cl will fail to build and produce warnings about redefining existing symbols, mostly for float.h and math.h compatibility.
To resolve this, this moves the clang-cl detection earlier in the CMakeLists.txt so that CLANG_CL can be checked properly where there is an existing MSVC workaround for these symbols.
This resolves the build using the latest clang-cl from the LLVM clang repo as well as clang-cl that can be installed with MSVC 2022.
Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
Eric Hawicz [Thu, 7 Aug 2025 13:46:47 +0000 (09:46 -0400)]
Merge pull request #893 from sffc/supplemental-code-point-bug
Fix bug involving supplemental code points that look like high surrogates
Guilhem Saurel [Wed, 6 Aug 2025 20:09:34 +0000 (22:09 +0200)]
CMake: sync minimum version
Shane F. Carr [Thu, 31 Jul 2025 00:40:56 +0000 (17:40 -0700)]
Fix code and update tests
Shane F. Carr [Thu, 31 Jul 2025 00:39:47 +0000 (17:39 -0700)]
Add tests with current behavior
Eric Hawicz [Wed, 9 Jul 2025 01:02:52 +0000 (21:02 -0400)]
Make json_parse a bit more useful by adding -u (validate UTF8) and -P (specify arbitrary tokener parse flags), and read from stdin if no filename is provided.
Eric Hawicz [Fri, 4 Apr 2025 01:09:05 +0000 (21:09 -0400)]
Issue #867 - also disallow control characters in keys
Eric Hawicz [Thu, 9 Jan 2025 05:12:09 +0000 (00:12 -0500)]
Merge pull request #884 from careles/mingw_win64-WIN32_LEAN_AND_MEAN-redefined
fix macro WIN32_LEAN_AND_MEAN redefined
Careles [Mon, 6 Jan 2025 02:56:53 +0000 (10:56 +0800)]
fix macro WIN32_LEAN_AND_MEAN redefined
json-c as add_subdirectory and project cmakelists.txt has add_definitions(-DWIN32_LEAN_AND_MEAN)
Eric Hawicz [Sun, 29 Dec 2024 18:34:38 +0000 (13:34 -0500)]
Merge pull request #872 from GitMensch/patch-2
fix linkhash breaking -std=c89
Eric Hawicz [Sun, 29 Dec 2024 18:26:11 +0000 (13:26 -0500)]
Merge pull request #847 from sacredbanana/amiga
Add support for Commodore Amiga
Eric Hawicz [Fri, 27 Dec 2024 00:07:07 +0000 (19:07 -0500)]
Merge pull request #882 from simonresch/handle-nan-to-int-conversion
Explicitly handle NaN values when converting to integer
Cameron Armstrong (Nightfox) [Fri, 30 Aug 2024 19:57:46 +0000 (03:57 +0800)]
Add support for MorphOS
Cameron Armstrong (Nightfox) [Mon, 5 Aug 2024 04:50:47 +0000 (12:50 +0800)]
Remove linking to libamiga and libc
Cameron Armstrong (Nightfox) [Mon, 15 Jul 2024 03:30:44 +0000 (11:30 +0800)]
Do not use duplocale if building for libnix because it isnt supported yet
Cameron Armstrong (Nightfox) [Sat, 22 Jun 2024 10:49:50 +0000 (18:49 +0800)]
Clean up CMakeLists.txt and remove Amiga specific locale.h guard
Cameron Armstrong (Nightfox) [Sat, 22 Jun 2024 05:45:15 +0000 (13:45 +0800)]
Fix Readme
Cameron Armstrong [Wed, 27 Dec 2023 23:53:32 +0000 (07:53 +0800)]
Get working ror libnix and clib2
Cameron Armstrong [Sat, 23 Dec 2023 11:47:38 +0000 (19:47 +0800)]
Add support for Commodore Amiga
Eric Hawicz [Sat, 7 Dec 2024 18:33:05 +0000 (13:33 -0500)]
Merge pull request #879 from janotomko/null
Handle NULL gracefully in json_tokener_free
Simon Resch [Tue, 26 Nov 2024 19:42:29 +0000 (20:42 +0100)]
Set error codes for truncating int conversions
json_object_get_int/int64/uint64() now sets errno to ERANGE when the source value
can't be represented in the target type.
Simon Resch [Thu, 14 Nov 2024 12:47:18 +0000 (13:47 +0100)]
Explicitly handle NaN values when converting to int
Json objects of type double with the value NaN could cause undefined
behavior when casting double to int in `json_object_get_int`.
Eric Hawicz [Sun, 24 Nov 2024 00:39:50 +0000 (19:39 -0500)]
Merge pull request #878 from 0xfadead/readme-fix-underline
Fix underline bug in README
Eric Hawicz [Sun, 24 Nov 2024 00:39:13 +0000 (19:39 -0500)]
Merge pull request #883 from simonresch/add-oss-fuzz-tests
Add fuzz tests for json_object/point/array apis
Simon Resch [Sat, 9 Nov 2024 03:20:40 +0000 (22:20 -0500)]
Add fuzz tests for json_object/point/array apis
Extends the coverage of fuzz tests executed in OSS-Fuzz.
Eric Hawicz [Mon, 18 Nov 2024 03:11:24 +0000 (22:11 -0500)]
Issue #881: don't allow json_tokener_new_ex() with a depth < 1
Eric Hawicz [Sat, 9 Nov 2024 03:20:40 +0000 (22:20 -0500)]
Fix issue #875: cast to unsigned char so bytes above 0x7f aren't interpreted as negative, which was causing the strict-mode control characters check to incorrectly trigger.
Ján Tomko [Wed, 6 Nov 2024 14:19:04 +0000 (15:19 +0100)]
Handle NULL gracefully in json_tokener_free
Similarly to glibc's free, make json_tokener_free(NULL)
a no-op, to simplify cleanup paths.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Eric Hawicz [Mon, 4 Nov 2024 00:44:21 +0000 (19:44 -0500)]
Fix the apps/json_parse "-s" (strict) option so it actually does something, and default to non-strict.
Awildidiot [Sun, 3 Nov 2024 19:03:49 +0000 (20:03 +0100)]
Fix underline bug in README
Eric Hawicz [Fri, 11 Oct 2024 00:55:18 +0000 (20:55 -0400)]
Merge pull request #873 from esiaero/master
Correct year in changelog for 0.18 release
Evan Si [Thu, 10 Oct 2024 23:47:55 +0000 (23:47 +0000)]
Correct year in changelog for 0.18 release
Simon Sobisch [Mon, 7 Oct 2024 08:16:42 +0000 (08:16 +0000)]
fix linkhash breaking -std=c89
making the definition of _LH_INLINE depending on __STDC_VERSION__, not on a specific compiler
Eric Hawicz [Sun, 15 Sep 2024 17:16:48 +0000 (13:16 -0400)]
Update openssl command to work for newer versions of openssl.
Eric Hawicz [Sun, 15 Sep 2024 17:06:06 +0000 (13:06 -0400)]
Update the master branch to version 0.18.99
Eric Haszlakiewicz [Sun, 15 Sep 2024 16:10:57 +0000 (16:10 +0000)]
Update abi-check.sh to compare 0.16 and 0.18
Eric Hawicz [Sun, 15 Sep 2024 15:59:05 +0000 (11:59 -0400)]
Fix the expected output for test_parse
Eric Hawicz [Sun, 15 Sep 2024 15:46:56 +0000 (11:46 -0400)]
Update ChangeLog, AUTHORS and issues_closed_for_0.18.md for an upcoming 0.18 release.
Eric Hawicz [Sun, 15 Sep 2024 15:22:58 +0000 (11:22 -0400)]
Merge pull request #871 from json-c/disallow-control-chars
Issue #867: disallow control characters in strict mode.
Eric Hawicz [Mon, 2 Sep 2024 13:43:04 +0000 (09:43 -0400)]
Issue #867: disallow control characters in strict mode.
Eric Hawicz [Fri, 30 Aug 2024 01:08:52 +0000 (21:08 -0400)]
Merge pull request #864 from pavelzw/patch-1
Build pkg-config for msvc as well
Pavel Zwerschke [Thu, 29 Aug 2024 08:55:02 +0000 (10:55 +0200)]
Update CMakeLists.txt
Pavel Zwerschke [Mon, 17 Jun 2024 22:11:13 +0000 (00:11 +0200)]
Build pkg-config for msvc as well
Eric Hawicz [Sun, 5 May 2024 13:49:26 +0000 (09:49 -0400)]
Merge pull request #861 from bhaible/handle-another-oom-condition
Handle yet another out-of-memory condition.
Eric Haszlakiewicz [Sun, 28 Apr 2024 17:15:42 +0000 (17:15 +0000)]
Although CMAKE_C_COMPILER_FRONTEND_VARIANT is defined, it's not always set to some value. Fix builds for cases when it's blank.
Bruno Haible [Sun, 21 Apr 2024 23:50:59 +0000 (01:50 +0200)]
Handle yet another out-of-memory condition.
duplocale() can return NULL, with errno set to ENOMEM.
In this case, bail out and set the current error code to
json_tokener_error_memory.
Eric Hawicz [Sun, 21 Apr 2024 14:37:16 +0000 (10:37 -0400)]
Issue #857: fix a few places where json_tokener should have been returning json_tokener_error_memory but wasn't.
Eric Hawicz [Tue, 16 Apr 2024 15:23:09 +0000 (11:23 -0400)]
Merge pull request #858 from alurm/master
json_tokener.h: json_tokener_parse_verbose: fix typo
Alan Urmancheev [Tue, 16 Apr 2024 14:56:00 +0000 (14:56 +0000)]
json_tokener.h: json_tokener_parse_verbose: fix typo
Eric Hawicz [Sat, 30 Mar 2024 02:40:45 +0000 (22:40 -0400)]
Issue #829: attempt to detect clang-cl.exe and pass MSVC-compatile command line arguments.
Eric Hawicz [Fri, 29 Mar 2024 22:46:05 +0000 (18:46 -0400)]
Issue #850: fill in & adjust the "@returns" docs for several functions.
Eric Hawicz [Fri, 29 Mar 2024 22:45:22 +0000 (18:45 -0400)]
doxygen can't handle html on heading, split that to separate lines
https://github.com/doxygen/doxygen/issues/10466
Eric Hawicz [Fri, 29 Mar 2024 22:09:12 +0000 (18:09 -0400)]
Fix issue #854: Set error=json_tokener_error_memory in json_tokener_parser_verbose() when allocating the tokener fails.
Eric Hawicz [Sat, 2 Mar 2024 22:31:24 +0000 (17:31 -0500)]
Merge pull request #852 from fedefrancescon/docs/micro-typo-fix
docs: micro typo in json_object_put doc
Federico Francescon [Sat, 2 Mar 2024 21:41:10 +0000 (22:41 +0100)]
docs: micro typo in json_object_get doc
Eric Hawicz [Thu, 8 Feb 2024 13:11:57 +0000 (08:11 -0500)]
Merge pull request #831 from neheb/1
rename WIN32 to _WIN32
Rosen Penev [Thu, 14 Sep 2023 03:51:49 +0000 (20:51 -0700)]
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>
Eric Hawicz [Mon, 8 Jan 2024 17:45:39 +0000 (12:45 -0500)]
Merge pull request #849 from rouault/random_seed_toctou
random_seed.c: add a Coverity Scan suppression
Even Rouault [Sun, 7 Jan 2024 19:55:35 +0000 (20:55 +0100)]
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.
Eric Hawicz [Sun, 17 Dec 2023 12:23:07 +0000 (07:23 -0500)]
Merge pull request #846 from evo-i/CMP0153
Use execute_process instead of exec_program
evo [Sun, 17 Dec 2023 08:19:20 +0000 (11:19 +0300)]
Update CMakeLists.txt
Replace with `execute_process` available on v3.0+
evo [Sat, 16 Dec 2023 21:32:21 +0000 (00:32 +0300)]
Update CMakeLists.txt
Now saved to variable.
evo [Sat, 16 Dec 2023 21:23:51 +0000 (00:23 +0300)]
Fix ECHO_OUTPUT_VARIABLE
evo [Tue, 12 Dec 2023 13:28:41 +0000 (16:28 +0300)]
[CMP0153](https://cmake.org/cmake/help/latest/policy/CMP0153.html)
Eric Haszlakiewicz [Thu, 30 Nov 2023 13:59:13 +0000 (13:59 +0000)]
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.
Eric Hawicz [Wed, 8 Nov 2023 23:11:13 +0000 (18:11 -0500)]
Merge pull request #839 from ffontaine/master
json_pointer.c: initialize idx
Fabrice Fontaine [Wed, 8 Nov 2023 21:42:48 +0000 (22:42 +0100)]
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>
Eric Hawicz [Thu, 19 Oct 2023 11:49:32 +0000 (07:49 -0400)]
Merge pull request #837 from HansolChoe/fix-tokener-parse-ex-fuzzer
Add type checking for parsed objects in tokener_parse_ex_fuzzer
HansolChoe [Thu, 19 Oct 2023 07:33:01 +0000 (16:33 +0900)]
tokener_parse_ex_fuzzer: add type checking for parsed object
Eric Hawicz [Sat, 23 Sep 2023 02:26:21 +0000 (22:26 -0400)]
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!)
Eric Hawicz [Sun, 10 Sep 2023 22:13:45 +0000 (00:13 +0200)]
Merge pull request #827 from robert-pang/master
Resolve build issue in tokener_parse_ex_fuzzer.c
Eric Hawicz [Sun, 10 Sep 2023 22:10:55 +0000 (00:10 +0200)]
Merge pull request #826 from emlix/cmake-policies
CMake: remove needless policy setting
Robert Pang [Tue, 5 Sep 2023 20:58:51 +0000 (13:58 -0700)]
Fix variable and API names in tokener_parse_ex_fuzzer.cc to resolve build issue.
Rolf Eike Beer [Tue, 5 Sep 2023 12:31:24 +0000 (14:31 +0200)]
CMake: request all policies up to CMake 3.12 being set to NEW
Rolf Eike Beer [Tue, 5 Sep 2023 12:27:27 +0000 (14:27 +0200)]
CMake: request consistent minimum version
Rolf Eike Beer [Tue, 5 Sep 2023 10:14:46 +0000 (12:14 +0200)]
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.
Eric Haszlakiewicz [Sat, 12 Aug 2023 19:08:59 +0000 (19:08 +0000)]
Update the master branch to version 0.17.99
Eric Hawicz [Sat, 12 Aug 2023 18:34:35 +0000 (14:34 -0400)]
Add an abi-check.sh script that shows how to run the abi-compliance-checker, update release creation steps slightly.
Eric Haszlakiewicz [Sat, 12 Aug 2023 18:52:32 +0000 (18:52 +0000)]
Also fix messages returned from json_tokener_error_desc() (broke due to the ordering change of enum json_tokener_error)
Eric Hawicz [Sat, 12 Aug 2023 17:54:50 +0000 (13:54 -0400)]
Move the json_tokener_error_memory entry to the end of enum json_tokener_error to restore binary compatibility with 0.16
Eric Hawicz [Sat, 12 Aug 2023 17:53:27 +0000 (13:53 -0400)]
Update the AUTHORS file and add issues_closed_for_0.17.md for the upcoming 0.17 release
Eric Hawicz [Tue, 8 Aug 2023 21:31:38 +0000 (17:31 -0400)]
Update the ChangeLog for 0.17 based on notable commits since 0.16
Eric Hawicz [Sun, 6 Aug 2023 19:35:04 +0000 (15:35 -0400)]
Fix issue #823: add back json_number_chars, but only because it's part of the public API.
Eric Hawicz [Sun, 6 Aug 2023 02:32:37 +0000 (22:32 -0400)]
Merge pull request #679 from GitMensch/patch-1
Let json-c be used with obsolete compilers
Eric Hawicz [Sun, 6 Aug 2023 02:11:30 +0000 (22:11 -0400)]
PR #679: add workaround for old compilers w/o stdint.h (i.e. VS2008 and earlier)
Eric Hawicz [Fri, 4 Aug 2023 15:47:23 +0000 (11:47 -0400)]
Merge pull request #822 from SSharshunov/master
Added option to disable app build
Sergey Sharshunov [Fri, 4 Aug 2023 14:46:50 +0000 (19:46 +0500)]
Added option to disable app build
Eric Hawicz [Tue, 1 Aug 2023 02:19:30 +0000 (22:19 -0400)]
Merge pull request #702 from commodo/json_patch
json_patch: add first implementation only with patch application
Eric Hawicz [Sun, 30 Jul 2023 01:45:16 +0000 (21:45 -0400)]
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
Eric Hawicz [Sat, 29 Jul 2023 15:22:12 +0000 (11:22 -0400)]
Work around a somewhat misleading warning about "a function declaration without a prototype is deprecated in all versions of C" in test1.c
Eric Hawicz [Sat, 29 Jul 2023 02:12:51 +0000 (22:12 -0400)]
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.
Eric Hawicz [Thu, 27 Jul 2023 02:01:04 +0000 (22:01 -0400)]
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.
Eric Hawicz [Wed, 26 Jul 2023 22:15:07 +0000 (18:15 -0400)]
Fix an uninitialized memory access in json_pointer.
Add comments describing when the fields of the internal struct json_pointer_get_result are valid.