Projects
Mega:23.09
json-c
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:json-c.spec
Changed
@@ -1,12 +1,12 @@ %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} %global so_ver 5 -%global reldate 20220414 +%global reldate 20230812 Name: json-c -Version: 0.16 -Release: 3 +Version: 0.17 +Release: 1 Summary: JSON implementation in C License: MIT @@ -15,11 +15,6 @@ BuildRequires: cmake gcc ninja-build -Patch6001: backport-Add-test-to-check-for-the-memory-leak-mentioned-in-issue-781.patch -Patch6002: backport-Fix-memory-leak-with-emtpy-strings-in-json_object_set_string.patch -Patch6003: backport-json_object_from_fd_ex-fail-if-file-is-too-large.patch -Patch6004: backport-Explicitly-check-for-integer-overflow-when-parsing.patch - %description JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted @@ -106,6 +101,9 @@ %doc %{_pkgdocdir} %changelog +* Wed Aug 16 2023 dillon chen <dillon.chen@gmail.com> - 0.17-1 +- Update to 0.17 + * Fri Apr 21 2023 zhangrui <zhangrui182@huawei.com> - 0.16-3 - backport patch to fix integer overflow
View file
_service:tar_scm:backport-Add-test-to-check-for-the-memory-leak-mentioned-in-issue-781.patch
Deleted
@@ -1,31 +0,0 @@ -From 16208fc01afcd742fd5e6736f52849ad2ec03e8f Mon Sep 17 00:00:00 2001 -From: Eric Haszlakiewicz <erh+git@nimenees.com> -Date: Sun, 24 Jul 2022 18:59:26 +0000 -Subject: PATCH Add test to check for the memory leak mentioned in issue #781 - -Conflict:NA -Reference:https://github.com/json-c/json-c/commit/16208fc01afcd742fd5e6736f52849ad2ec03e8f - ---- - tests/test_set_value.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/tests/test_set_value.c b/tests/test_set_value.c -index f51a2a5b67..a8ebbfec79 100644 ---- a/tests/test_set_value.c -+++ b/tests/test_set_value.c -@@ -71,6 +71,14 @@ int main(int argc, char **argv) - json_object_set_string(tmp, SHORT); - assert(strcmp(json_object_get_string(tmp), SHORT) == 0); - assert(strcmp(json_object_to_json_string(tmp), "\"" SHORT "\"") == 0); -+ -+ // Set an empty string a couple times to try to trigger -+ // a case that used to leak memory. -+ json_object_set_string(tmp, ""); -+ json_object_set_string(tmp, HUGE); -+ json_object_set_string(tmp, ""); -+ json_object_set_string(tmp, HUGE); -+ - json_object_put(tmp); - printf("STRING PASSED\n"); -
View file
_service:tar_scm:backport-Explicitly-check-for-integer-overflow-when-parsing.patch
Deleted
@@ -1,52 +0,0 @@ -From d6f46ae104871360f84695737864870c97adfd14 Mon Sep 17 00:00:00 2001 -From: Eric Haszlakiewicz <erh+git@nimenees.com> -Date: Sun, 30 Oct 2022 19:29:15 +0000 -Subject: PATCH Explicitly check for integer overflow/underflow when - parsing integers with JSON_TOKENER_STRICT. - -Reference:https://github.com/json-c/json-c/commit/d6f46ae104871360f84695737864870c97adfd14 -Conflict:Ignore changes in the ChangeLog and test because the pre-feature patch is not merged - ---- - json_tokener.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/json_tokener.c b/json_tokener.c -index 0c09b66..1feee65 100644 ---- a/json_tokener.c -+++ b/json_tokener.c -@@ -17,6 +17,7 @@ - - #include "math_compat.h" - #include <assert.h> -+#include <errno.h> - #include <limits.h> - #include <math.h> - #include <stddef.h> -@@ -991,6 +992,11 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char * - if (!tok->is_double && tok->pb->buf0 == '-' && - json_parse_int64(tok->pb->buf, &num64) == 0) - { -+ if (errno == ERANGE && (tok->flags & JSON_TOKENER_STRICT)) -+ { -+ tok->err = json_tokener_error_parse_number; -+ goto out; -+ } - current = json_object_new_int64(num64); - if (current == NULL) - goto out; -@@ -998,6 +1004,11 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char * - else if (!tok->is_double && tok->pb->buf0 != '-' && - json_parse_uint64(tok->pb->buf, &numuint64) == 0) - { -+ if(errno==ERANGE&&(tok->flags & JSON_TOKENER_STRICT)) -+ { -+ tok->err=json_tokener_error_parse_number; -+ goto out; -+ } - if (numuint64 && tok->pb->buf0 == '0' && - (tok->flags & JSON_TOKENER_STRICT)) - { --- -2.27.0 -
View file
_service:tar_scm:backport-Fix-memory-leak-with-emtpy-strings-in-json_object_set_string.patch
Deleted
@@ -1,67 +0,0 @@ -From 213bb5caa11ed2182848d86c86f8e9ab4c75642a Mon Sep 17 00:00:00 2001 -From: Daniel Danzberger <daniel@dd-wrt.com> -Date: Sun, 24 Jul 2022 18:46:03 +0200 -Subject: PATCH Fix memory leak with emtpy strings in json_object_set_string - -When a json string object is updated with a bigger string, a new -malloc'ed buffer is used to store the new string and it's size is made -negative to indicate that an external buffer is in use. - -When that same json string object get's updated again with an empty -stirng (size = 0), the new external malloc'ed buffer is still used. -But the fact that the new size value is not negative removes the -indicator that the externally malloc'ed buffer is used. - -This becomes a problem when the object get's updated again with any -other string, because a new buffer will be malloced and linked to the -object while to old one won't be free'd. - -This causes a memory leak when updating a json string with -json_object_set_stirng() which has previously been updated -with an empty string. - -Example: --- -obj = json_object_new_string("data"); -json_object_set_string(obj, "more data"); -json_object_set_string(obj, ""); -json_object_set_string(obj, "other data"); /* leaks */ --- - -This commit fixes the issue by free'ing the external buffer when an -empty string is set and use the internal one again. - -Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com> - -Conflict:NA -Reference:https://github.com/json-c/json-c/commit/213bb5caa11ed2182848d86c86f8e9ab4c75642a ---- - json_object.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/json_object.c b/json_object.c -index e52ca4071a..581b1e2748 100644 ---- a/json_object.c -+++ b/json_object.c -@@ -1323,11 +1323,18 @@ static int _json_object_set_string_len(json_object *jso, const char *s, size_t l - // length as int, cap length at INT_MAX. - return 0; - -- dstbuf = get_string_component_mutable(jso); - curlen = JC_STRING(jso)->len; -- if (curlen < 0) -- curlen = -curlen; -+ if (curlen < 0) { -+ if (len == 0) { -+ free(JC_STRING(jso)->c_string.pdata); -+ JC_STRING(jso)->len = curlen = 0; -+ } else { -+ curlen = -curlen; -+ } -+ } -+ - newlen = len; -+ dstbuf = get_string_component_mutable(jso); - - if ((ssize_t)len > curlen) - {
View file
_service:tar_scm:backport-json_object_from_fd_ex-fail-if-file-is-too-large.patch
Deleted
@@ -1,111 +0,0 @@ -From 5accae04bbc727fd447c2db4c1c541a4142bd4a0 Mon Sep 17 00:00:00 2001 -From: Tobias Stoeckmann <tobias@stoeckmann.org> -Date: Sun, 20 Mar 2022 13:17:37 +0100 -Subject: PATCH json_object_from_fd_ex: fail if file is too large - -If the input file is too large to fit into a printbuf then return an -error value instead of silently truncating the parsed content. - -This introduces errno handling into printbuf to distinguish between an -input file being too large and running out of memory. - -Conflict:tests/test_util_file.expected,0.16 version has merge. -Reference:https://github.com/json-c/json-c/commit/5accae04bbc727fd447c2db4c1c541a4142bd4a0 ---- - json_util.c | 13 ++++++++++--- - printbuf.c | 14 +++++++++++++- - 2 files changed, 23 insertions(+), 4 deletions(-) - -diff --git a/json_util.c b/json_util.c -index 3e6a6c681b..e1c05c5cfd 100644 ---- a/json_util.c -+++ b/json_util.c -@@ -101,15 +101,22 @@ struct json_object *json_object_from_fd_ex(int fd, int in_depth) - if (!tok) - { - _json_c_set_last_err( -- "json_object_from_fd_ex: unable to allocate json_tokener(depth=%d): %s\n", depth, -- strerror(errno)); -+ "json_object_from_fd_ex: unable to allocate json_tokener(depth=%d): %s\n", -+ depth, strerror(errno)); - printbuf_free(pb); - return NULL; - } - - while ((ret = read(fd, buf, JSON_FILE_BUF_SIZE)) > 0) - { -- printbuf_memappend(pb, buf, ret); -+ if (printbuf_memappend(pb, buf, ret) < 0) -+ { -+ _json_c_set_last_err("json_object_from_fd_ex: error reading fd %d: %s\n", -+ fd, strerror(errno)); -+ json_tokener_free(tok); -+ printbuf_free(pb); -+ return NULL; -+ } - } - if (ret < 0) - { -diff --git a/printbuf.c b/printbuf.c -index a08f7b1582..12d3b3319d 100644 ---- a/printbuf.c -+++ b/printbuf.c -@@ -15,6 +15,7 @@ - - #include "config.h" - -+#include <errno.h> - #include <limits.h> - #include <stdio.h> - #include <stdlib.h> -@@ -56,6 +57,8 @@ struct printbuf *printbuf_new(void) - * - * If the current size is large enough, nothing is changed. - * -+ * If extension failed, errno is set to indicate the error. -+ * - * Note: this does not check the available space! The caller - * is responsible for performing those calculations. - */ -@@ -68,7 +71,10 @@ static int printbuf_extend(struct printbuf *p, int min_size) - return 0; - /* Prevent signed integer overflows with large buffers. */ - if (min_size > INT_MAX - 8) -+ { -+ errno = EFBIG; - return -1; -+ } - if (p->size > INT_MAX / 2) - new_size = min_size + 8; - else { -@@ -77,7 +83,7 @@ static int printbuf_extend(struct printbuf *p, int min_size) - new_size = min_size + 8; - } - #ifdef PRINTBUF_DEBUG -- MC_DEBUG("printbuf_memappend: realloc " -+ MC_DEBUG("printbuf_extend: realloc " - "bpos=%d min_size=%d old_size=%d new_size=%d\n", - p->bpos, min_size, p->size, new_size); - #endif /* PRINTBUF_DEBUG */ -@@ -92,7 +98,10 @@ int printbuf_memappend(struct printbuf *p, const char *buf, int size) - { - /* Prevent signed integer overflows with large buffers. */ - if (size < 0 || size > INT_MAX - p->bpos - 1) -+ { -+ errno = EFBIG; - return -1; -+ } - if (p->size <= p->bpos + size + 1) - { - if (printbuf_extend(p, p->bpos + size + 1) < 0) -@@ -112,7 +121,10 @@ int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len) - offset = pb->bpos; - /* Prevent signed integer overflows with large buffers. */ - if (len < 0 || offset < -1 || len > INT_MAX - offset) -+ { -+ errno = EFBIG; - return -1; -+ } - size_needed = offset + len; - if (pb->size < size_needed) - {
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/strerror_override_private.h
Deleted
@@ -1,14 +0,0 @@ -#ifndef __json_strerror_override_private_h__ -#define __json_strerror_override_private_h__ - -/** - * @file - * @brief Do not use, json-c internal, may be changed or removed at any time. - */ - -#include "json_types.h" - -/* Used by tests to get consistent output */ -JSON_EXPORT int _json_c_strerror_enable; - -#endif
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/.gitignore -> _service:tar_scm:json-c-0.17-20230812.tar.gz/.gitignore
Changed
@@ -27,6 +27,7 @@ /tests/test_double_serializer /tests/test_float /tests/test_int_add +/tests/test_int_get /tests/test_json_pointer /tests/test_locale /tests/test_null
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/.travis.yml -> _service:tar_scm:json-c-0.17-20230812.tar.gz/.travis.yml
Changed
@@ -1,8 +1,8 @@ language: cpp matrix: include: -# gcc -# xenial + +# ubuntu xenial 16.04 # gcc 5 is the default on xenial - os: linux dist: xenial @@ -15,35 +15,37 @@ - doxygen - cmake env: CHECK="true" -# bionic - - os: linux - dist: bionic - compiler: gcc - env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" - # gcc 7 is the default on bionic +# ubuntu bionic 18.04 +# gcc 7 is the default on bionic - os: linux dist: bionic compiler: gcc + addons: + apt: + packages: + - valgrind + - cppcheck + - doxygen + - cmake env: CHECK="true" - - os: linux - dist: bionic - compiler: gcc - env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" -# clang -# xenial +# ubuntu focal fossa 20.04 +# gcc 9 is the default on bionic - os: linux - dist: xenial - compiler: clang + dist: focal + compiler: gcc addons: apt: - sources: - - llvm-toolchain-xenial-5.0 packages: - - clang-5.0 + - valgrind + - cppcheck + - doxygen - cmake - env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" + env: CHECK="true" + +# clang +# xenial - os: linux dist: xenial compiler: clang @@ -56,9 +58,9 @@ - cmake env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0" - # clang-7 is the default on xenial and bionic + # clang-7 is the default on focal, xenial and bionic - os: linux - dist: xenial + dist: focal compiler: clang addons: apt: @@ -69,17 +71,9 @@ - cmake env: CHECK="true" -# bionic - - os: linux - dist: bionic - compiler: clang - env: CHECK="true" # osx - os: osx - osx_image: xcode9.4 - env: XCODE="true" - - os: osx - osx_image: xcode12.5 + osx_image: xcode13.4 env: XCODE="true" CHECK="true" # run coveralls
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/AUTHORS -> _service:tar_scm:json-c-0.17-20230812.tar.gz/AUTHORS
Changed
@@ -1,6 +1,7 @@ Alan Coopersmith <alan.coopersmith@oracle.com> Alexander Dahl <post@lespocky.de> Alexandru Ardelean <ardeleanalex@gmail.com> +An7ar35 <eadavison@protonmail.com> andy5995 <andy400-dev@yahoo.com> Aram Poghosyan <Aram.Poghosyan@teamviewer.com> Björn Esser <besser82@fedoraproject.org> @@ -11,13 +12,16 @@ Christopher Head <chead@chead.ca> Chris Wolfe <chriswwolfe@gmail.com> C. Watford (christopher.watford@gmail.com) +Daniel Danzberger <daniel@dd-wrt.com> Darjan Krijan <darjan_krijan@gmx.de> David McCann <mccannd@uk.ibm.com> DeX77 <dex@dragonslave.de> +Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> dota17 <chenguopingdota@163.com> Eric Haszlakiewicz <erh+git@nimenees.com> Eric Hawicz <erh+git@nimenees.com> Even Rouault <even.rouault@spatialys.com> +Federico Francescon <federico.francescon@higeco.com> Gianluigi Tiesi <sherpya@netfarm.it> grdowns <grdowns@microsoft.com> Hex052 <elijahiff@gmail.com> @@ -27,6 +31,7 @@ Jaap Keuter <jaap.keuter@xs4all.nl> Jakov Smolic <jakov.smolic@sartura.hr> janczer <menshikov.ivn@gmail.com> +JC (Jonathan Chen) <jc@dijonkitchen.org> Jehan <jehan@girinstud.io> Jehiah Czebotar <jehiah@gmail.com> Jonathan Wiens <j.wiens@teles.com> @@ -34,10 +39,13 @@ José Bollo <jose.bollo@iot.bzh> Juuso Alasuutari <juuso.alasuutari@gmail.com> Keith Holman <keith.holman@windriver.com> +Khem Raj <raj.khem@gmail.com> Kizuna-Meraki <z9@kizunameraki.de> Leon Gross <leon.gross@rub.de> Liang, Gao <liang.gao@intel.com> +Luca Mannella <luca.mannella@studenti.polito.it> Marc <34656315+MarcT512@users.noreply.github.com> +Matthias Gatto <matthias.gatto@protonmail.com> max <mpano91@gmail.com> Micah Snyder <micasnyd@cisco.com> Michael Clark <michael@metaparadigm.com> @@ -53,9 +61,11 @@ Robert <roby_p97@yahoo.com> Rosen Penev <rosenp@gmail.com> Rubasri Kalidas <rubasri.kalidas@intel.com> +Sergey Sharshunov <s.sharshunov@gmail.com> Simon McVittie <smcv@collabora.com> ssrlive <30760636+ssrlive@users.noreply.github.com> Tobias Nießen <tniessen@users.noreply.github.com> Tobias Stoeckmann <tobias@stoeckmann.org> Tudor Brindus <me@tbrindus.ca> Unmanned Player <36690541+unmanned-player@users.noreply.github.com> +Yurii Rashkovskii <yrashk@gmail.com>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/CMakeLists.txt -> _service:tar_scm:json-c-0.17-20230812.tar.gz/CMakeLists.txt
Changed
@@ -1,31 +1,26 @@ -# Many projects still are stuck using CMake 2.8 is several places so it's good to provide backward support too. This is -# specially true in old embedded systems (OpenWRT and friends) where CMake isn't necessarily upgraded. -cmake_minimum_required(VERSION 2.8) +# CMake 3.9 was released in 2017/07 +# As of 2023, many versions of Linux, NetBSD and FreeBSD provide, +# and many OpenWRT packages require, much newer CMake packages. +# We're stopping before 3.10 because that version starts requiring +# c++11, which isn't available on e.g HPUX. +cmake_minimum_required(VERSION 3.9) -if(POLICY CMP0048) - cmake_policy(SET CMP0048 NEW) -endif() +# The project() command manages VERSION variables. +cmake_policy(SET CMP0048 NEW) # JSON-C library is C only project. -if (CMAKE_VERSION VERSION_LESS 3.0) - project(json-c) - set(PROJECT_VERSION_MAJOR "0") - set(PROJECT_VERSION_MINOR "16") - set(PROJECT_VERSION_PATCH "0") - set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") -else() - project(json-c LANGUAGES C VERSION 0.16) -endif() +# PROJECT_VERSION{,_MAJOR,_MINOR,_PATCH} set by project(): +project(json-c LANGUAGES C VERSION 0.17) -# If we've got 3.0 then it's good, let's provide support. Otherwise, leave it be. -if(POLICY CMP0038) - # Policy CMP0038 introduced was in CMake 3.0 - cmake_policy(SET CMP0038 NEW) -endif() +# Targets may not link directly to themselves. +cmake_policy(SET CMP0038 NEW) -if(POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif() +# MACOSX_RPATH is enabled by default. +# We set it explicitly to avoid the warning +cmake_policy(SET CMP0042 NEW) + +# Only interpret if() arguments as variables or keywords when unquoted. +cmake_policy(SET CMP0054 NEW) # set default build type if not specified by user if(NOT CMAKE_BUILD_TYPE) @@ -36,22 +31,13 @@ # Include file check macros honor CMAKE_REQUIRED_LIBRARIES # i.e. the check_include_file() calls will include -lm when checking. +# New in version 3.12. if(POLICY CMP0075) cmake_policy(SET CMP0075 NEW) endif() include(CTest) -if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND - (NOT MSVC OR NOT (MSVC_VERSION LESS 1800)) # Tests need at least VS2013 - ) -add_subdirectory(tests) -endif() - -if (NOT MSVC) # cmd line apps don't built on Windows currently. -add_subdirectory(apps) -endif() - # Set some packaging variables. set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") @@ -102,7 +88,10 @@ option(ENABLE_THREADING "Enable partial threading support." OFF) option(OVERRIDE_GET_RANDOM_SEED "Override json_c_get_random_seed() with custom code." OFF) option(DISABLE_EXTRA_LIBS "Avoid linking against extra libraries, such as libbsd." OFF) -option(DISABLE_JSON_POINTER "Disable JSON pointer (RFC6901) support." OFF) +option(DISABLE_JSON_POINTER "Disable JSON pointer (RFC6901) and JSON patch support." OFF) +option(DISABLE_JSON_PATCH "Disable JSON patch (RFC6902) support." OFF) +option(NEWLOCALE_NEEDS_FREELOCALE "Work around newlocale bugs in old FreeBSD by calling freelocale" OFF) +option(BUILD_APPS "Default to building apps" ON) if (UNIX OR MINGW OR CYGWIN) @@ -154,11 +143,14 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(xlocale.h HAVE_XLOCALE_H) +# Set json-c specific vars to stamp into json_config.h +# in a way that hopefully won't conflict with other +# projects that use json-c. if (HAVE_INTTYPES_H) - # Set a json-c specific var to stamp into json_config.h - # in a way that hopefully won't conflict with other - # projects that use json-c. - set(JSON_C_HAVE_INTTYPES_H 1) + set(JSON_C_HAVE_INTTYPES_H 1) +endif() +if (HAVE_STDINT_H) + set(JSON_C_HAVE_STDINT_H 1) endif() check_symbol_exists(_isnan "float.h" HAVE_DECL__ISNAN) @@ -183,10 +175,12 @@ if (NOT HAVE_ARC4RANDOM AND DISABLE_EXTRA_LIBS STREQUAL "OFF") check_include_file(bsd/stdlib.h HAVE_BSD_STDLIB_H) if (HAVE_BSD_STDLIB_H) - list(APPEND CMAKE_REQUIRED_LIBRARIES "-lbsd") - link_libraries(bsd) + list(APPEND CMAKE_REQUIRED_LIBRARIES "bsd") unset(HAVE_ARC4RANDOM CACHE) check_symbol_exists(arc4random "bsd/stdlib.h" HAVE_ARC4RANDOM) + if (NOT HAVE_ARC4RANDOM) + list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "bsd") + endif() endif() endif() @@ -200,6 +194,18 @@ check_symbol_exists(setlocale "locale.h" HAVE_SETLOCALE) check_symbol_exists(uselocale "locale.h" HAVE_USELOCALE) endif() + +# uClibc *intentionally* crashes in duplocale(), at least as of: +# https://github.com/ffainelli/uClibc/blob/266bdc1/libc/misc/locale/locale.c#L1322 +# So, if it looks like we're compiling for a system like that just disable +# locale handling entirely. +exec_program(${CMAKE_C_COMPILER} ARGS -dumpmachine OUTPUT_VARIABLE CMAKE_GNU_C_MACHINE) +if (CMAKE_GNU_C_MACHINE MATCHES "uclibc") + message(STATUS "Detected uClibc compiler, disabling locale handling") + set(HAVE_SETLOCALE 0) + set(HAVE_USELOCALE 0) +endif() + if (HAVE_STRINGS_H) check_symbol_exists(strcasecmp "strings.h" HAVE_STRCASECMP) check_symbol_exists(strncasecmp "strings.h" HAVE_STRNCASECMP) @@ -305,6 +311,11 @@ endif() add_definitions(-D_GNU_SOURCE) + + if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + # Remove this for 1.0 when we can bump the ABI and actually fix these warnings. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shorten-64-to-32") + endif() elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DEBUG") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4100") @@ -396,9 +407,9 @@ set(JSON_C_HEADERS ${JSON_C_PUBLIC_HEADERS} ${PROJECT_SOURCE_DIR}/json_object_private.h + ${PROJECT_SOURCE_DIR}/json_pointer_private.h ${PROJECT_SOURCE_DIR}/random_seed.h ${PROJECT_SOURCE_DIR}/strerror_override.h - ${PROJECT_SOURCE_DIR}/strerror_override_private.h ${PROJECT_SOURCE_DIR}/math_compat.h ${PROJECT_SOURCE_DIR}/snprintf_compat.h ${PROJECT_SOURCE_DIR}/strdup_compat.h @@ -424,8 +435,15 @@ set(JSON_C_PUBLIC_HEADERS ${JSON_C_PUBLIC_HEADERS} ${PROJECT_SOURCE_DIR}/json_pointer.h) set(JSON_C_SOURCES ${JSON_C_SOURCES} ${PROJECT_SOURCE_DIR}/json_pointer.c) set(JSON_H_JSON_POINTER "#include \"json_pointer.h\"") + + if (NOT DISABLE_JSON_PATCH) + set(JSON_C_PUBLIC_HEADERS ${JSON_C_PUBLIC_HEADERS} ${PROJECT_SOURCE_DIR}/json_patch.h) + set(JSON_C_SOURCES ${JSON_C_SOURCES} ${PROJECT_SOURCE_DIR}/json_patch.c) + set(JSON_H_JSON_PATCH "#include \"json_patch.h\"") + endif() else() set(JSON_H_JSON_POINTER "") + set(JSON_H_JSON_PATCH "") endif() configure_file(json.h.cmakein ${PROJECT_BINARY_DIR}/json.h @ONLY) @@ -454,7 +472,7 @@ ${JSON_C_HEADERS} ) set_target_properties(${PROJECT_NAME} PROPERTIES - VERSION 5.2.0 + VERSION 5.3.0 SOVERSION 5) list(APPEND CMAKE_TARGETS ${PROJECT_NAME}) # If json-c is used as subroject it set to target correct interface -I flags and allow @@ -465,6 +483,8 @@ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}> ) +target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_REQUIRED_LIBRARIES}) + # Allow to build static and shared libraries at the same time if (BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS) set(STATIC_LIB ${PROJECT_NAME}-static) @@ -478,6 +498,8 @@ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}> )
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/ChangeLog -> _service:tar_scm:json-c-0.17-20230812.tar.gz/ChangeLog
Changed
@@ -1,4 +1,39 @@ +0.17 (up to commit 077661f, 2023-08-08) +======================================== + +Deprecated and removed features: +-------------------------------- +* None + +New features +------------ +* json_patch: add first implementation only with patch application +* Add --disable-static and --disable-dynamic options to the cmake-configure script. +* Add -DBUILD_APPS=NO option to disable app build +* Minimum cmake version is now 3.9 + +Significant changes and bug fixes +--------------------------------- +* When serializing with JSON_C_TO_STRING_PRETTY set, keep the opening and + closing curly or square braces on same line for empty objects or arrays. +* Disable locale handling when targeting a uClibc system due to problems + with its duplocale() function. +* When parsing with JSON_TOKENER_STRICT set, integer overflow/underflow + now result in a json_tokener_error_parse_number. Without that flag + values are capped at INT64_MIN/UINT64_MAX. +* Fix memory leak with emtpy strings in json_object_set_string +* json_object_from_fd_ex: fail if file is too large (>=INT_MAX bytes) +* Add back json_number_chars, but only because it's part of the public API. +* Entirely drop mode bits from open(O_RDONLY) to avoid warnings on certain + platforms. +* Specify dependent libraries, including -lbsd, in a more consistent way so + linking against a static json-c works better +* Fix a variety of build problems and add & improve tests +* Update RFC reference to https://www.rfc-editor.org/rfc/rfc8259 + +*** + 0.16 (up to commit 66dcdf5, 2022-04-13) ========================================
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/README.md -> _service:tar_scm:json-c-0.17-20230812.tar.gz/README.md
Changed
@@ -4,14 +4,16 @@ ======== 1. Overview and Build Status(#overview) -2. Building on Unix(#buildunix) +2. Getting Help(#gettinghelp) +3. Building on Unix(#buildunix) * Prerequisites(#installprereq) * Build commands(#buildcmds) -3. CMake options(#CMake) -4. Testing(#testing) -5. Building with `vcpkg`(#buildvcpkg) -6. Linking to libjson-c(#linking) -7. Using json-c(#using) +4. CMake options(#CMake) +5. Testing(#testing) +6. Building with `vcpkg`(#buildvcpkg) +7. Building for Android(#android) +7. Linking to libjson-c(#linking) +8. Using json-c(#using) JSON-C - A JSON implementation in C <a name="overview"></a> ----------------------------------- @@ -19,7 +21,7 @@ JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects. -It aims to conform to RFC 7159(https://tools.ietf.org/html/rfc7159). +It aims to conform to RFC 8259(https://www.rfc-editor.org/rfc/rfc8259). Skip down to Using json-c(#using) or check out the API docs(https://json-c.github.io/json-c/), @@ -27,12 +29,23 @@ Home page for json-c: https://github.com/json-c/json-c/wiki -Build Status -* AppVeyor Build(https://ci.appveyor.com/project/hawicz/json-c) !AppVeyor Build Status(https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true) -* Travis Build(https://travis-ci.org/json-c/json-c) !Travis Build Status(https://travis-ci.org/json-c/json-c.svg?branch=master) +Getting Help <a name="gettinghelp"></a> +------------ + +If you have questions about using json-c, please start a thread on +our forums at: https://groups.google.com/forum/#!forum/json-c + +If you believe you've discovered a bug, report it at +(https://github.com/json-c/json-c/issues). Please be sure to include +the version of json-c you're using, the OS you're running on, and any +other relevant details. Fully reproducible test cases and/or patches +to fix problems are greatly appreciated. + +Fixes for bugs, or small new features can be directly submitted as a +pull request(https://github.com/json-c/json-c/pulls). For major new +features or large changes of any kind, please first start a discussion +on the forums(https://groups.google.com/forum/#!forum/json-c). -Test Status -* Coveralls(https://coveralls.io/github/json-c/json-c?branch=master) !Coverage Status(https://coveralls.io/repos/github/json-c/json-c/badge.svg?branch=master)(https://coveralls.io/github/json-c/json-c?branch=master) Building on Unix with `git`, `gcc` and `cmake` <a name="buildunix"></a> -------------------------------------------------- @@ -40,6 +53,13 @@ If you already have json-c installed, see Linking to `libjson-c`(#linking) for how to build and link your program against it. +Build Status +* AppVeyor Build(https://ci.appveyor.com/project/hawicz/json-c) !AppVeyor Build Status(https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true) +* Travis Build(https://app.travis-ci.com/github/json-c/json-c) !Travis Build Status(https://api.travis-ci.com/json-c/json-c.svg?branch=master) + +Test Status +* Coveralls(https://coveralls.io/github/json-c/json-c?branch=master) !Coverage Status(https://coveralls.io/repos/github/json-c/json-c/badge.svg?branch=master)(https://coveralls.io/github/json-c/json-c?branch=master) + ### Prerequisites: <a name="installprereq"></a> - `gcc`, `clang`, or another C compiler @@ -81,7 +101,7 @@ $ make $ make test $ make USE_VALGRIND=0 test # optionally skip using valgrind -$ make install +$ sudo make install # it could be necessary to execute make install ``` @@ -112,6 +132,8 @@ DISABLE_BSYMBOLIC | Bool | Disable use of -Bsymbolic-functions. DISABLE_THREAD_LOCAL_STORAGE | Bool | Disable use of Thread-Local Storage (HAVE___THREAD). DISABLE_WERROR | Bool | Disable use of -Werror. +DISABLE_EXTRA_LIBS | Bool | Disable use of extra libraries, libbsd +DISABLE_JSON_POINTER | Bool | Omit json_pointer support from the build. ENABLE_RDRAND | Bool | Enable RDRAND Hardware RNG Hash Seed. ENABLE_THREADING | Bool | Enable partial threading support. OVERRIDE_GET_RANDOM_SEED | String | A block of code to use instead of the default implementation of json_c_get_random_seed(), e.g. on embedded platforms where not even the fallback to time() works. Must be a single line. @@ -215,6 +237,29 @@ The JSON-C port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request(https://github.com/Microsoft/vcpkg) on the vcpkg repository. +Building for Android <a name="android"> +---------------------- + +Building on Android is now particularly well supported, but there +have been some reports of success using +https://developer.android.com/ndk/guides/cmake + +``` +mkdir json-c-build +cd json-c-build/ +export NDK_HOME=~/Library/Android/sdk/ndk/22.1.7171670/ +cmake \ + --toolchain=$NDK_HOME/build/cmake/android.toolchain.cmake \ + -DANDROID_STL=none \ + -DANDROID_ABI=arm64-v8a \ + -DANDROID_PLATFORM=android-29 \ + -DANDROID_LD=lld \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=<install prefix> \ + -DENABLE_THREADING=true \ + .. +make install +``` Linking to `libjson-c` <a name="linking"> ----------------------
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/RELEASE_CHECKLIST.txt -> _service:tar_scm:json-c-0.17-20230812.tar.gz/RELEASE_CHECKLIST.txt
Changed
@@ -16,6 +16,7 @@ changes (added/removed/updated funcs, etc...), and detect backwards compat issues. * https://github.com/lvc/abi-compliance-checker + * See also `abi-check.sh` * If the new release is not backwards compatible, then this is a MAJOR release. * Mention removed features in ChangeLog * Consider re-adding backwards compatible support, through symbol @@ -40,9 +41,15 @@ ## Release creation Start creating the new release: - release=0.16 + + PREV=$(git tag | tail -1) + PREV=${PREV#json-c-} + PREV=${PREV%-*} + release=0.$((${PREV#*.} + 1)) + cd ~ git clone https://github.com/json-c/json-c json-c-${release} + rm -rf distcheck mkdir distcheck cd distcheck # Note, the build directory *must* be entirely separate from @@ -54,8 +61,7 @@ Make any fixes/changes *before* branching. cd json-c-${release} - git branch json-c-${release} - git checkout json-c-${release} + git checkout -b json-c-${release} ------------ @@ -94,7 +100,11 @@ echo .git > excludes tar -czf json-c-${release}.tar.gz -X excludes json-c-${release} - echo 'doc/*' >> excludes + echo 'doc/*.cmake' >> excludes + echo 'doc/CMakeFiles' >> excludes + echo 'doc/Makefile' >> excludes + echo 'doc/Doxyfile' >> excludes + echo 'doc/html' >> excludes tar -czf json-c-${release}-nodoc.tar.gz -X excludes json-c-${release} ------------ @@ -113,7 +123,8 @@ https://console.aws.amazon.com/s3/ Upload the two tarballs in the json-c_releases/releases folder. - When uploading, use "Standard" storage class, and make the uploaded files publicly accessible. +* Expand "Permissions", pick "Grant public-read access" +* Expand "Properties", ensure "Standard" storage class is picked. Logout of Amazon S3, and verify that the files are visible. https://s3.amazonaws.com/json-c_releases/releases/index.html @@ -172,7 +183,8 @@ openssl md5 json-c*gz Copy and paste this output into the wiki page at: - https://github.com/json-c/json-c/wiki +* https://github.com/json-c/json-c/wiki +* https://github.com/json-c/json-c/wiki/Old-Releases ------------
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/abi-check.sh
Added
@@ -0,0 +1,42 @@ +#!/bin/sh + +prev=0.16 +release=0.17 + +# ... clone json-c, abi-compliance-checker, abi-dumper + +mkdir build +cd build +CFLAGS=-Og cmake -DCMAKE_INSTALL_PREFIX=~/json-c-installs/json-c-${release} .. +make && make test && make install + +# Assume the old version has already been built + +cd ~/abi-compliance-checker +mkxml() +{ + ver="$1" +cat <<EOF > json-c-${ver}.xml +<foo> +<version> + ${ver} +</version> + +<headers> +../json-c-installs/json-c-${ver}/include/json-c +</headers> + +<libs> +../json-c-installs/json-c-${ver}/lib64/libjson-c.so +</libs> +</foo> +EOF +} +mkxml ${release} +mkxml ${prev} + +perl abi-compliance-checker.pl -lib json-c -dump json-c-${prev}.xml -dump-path ./ABI-${prev}.dump +perl abi-compliance-checker.pl -lib json-c -dump json-c-${release}.xml -dump-path ./ABI-${release}.dump +perl abi-compliance-checker.pl -l json-c -old ABI-${prev}.dump -new ABI-${release}.dump + +echo "look in compat_reports/json-c/..."
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/apps/json_parse.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/apps/json_parse.c
Changed
@@ -22,16 +22,30 @@ #include <sys/time.h> #endif -static int formatted_output = 0; +#ifndef JSON_NORETURN +#if defined(_MSC_VER) +#define JSON_NORETURN __declspec(noreturn) +#elif defined(__OS400__) +#define JSON_NORETURN +#else +/* 'cold' attribute is for optimization, telling the computer this code + * path is unlikely. + */ +#define JSON_NORETURN __attribute__((noreturn, cold)) +#endif +#endif + +static int formatted_output = JSON_C_TO_STRING_SPACED; static int show_output = 1; static int strict_mode = 0; +static int color = 0; static const char *fname = NULL; #ifndef HAVE_JSON_TOKENER_GET_PARSE_END #define json_tokener_get_parse_end(tok) ((tok)->char_offset) #endif -static void usage(const char *argv0, int exitval, const char *errmsg); +JSON_NORETURN static void usage(const char *argv0, int exitval, const char *errmsg); static void showmem(void); static int parseit(int fd, int (*callback)(struct json_object *)); static int showobj(struct json_object *new_obj); @@ -42,7 +56,7 @@ struct rusage rusage; memset(&rusage, 0, sizeof(rusage)); getrusage(RUSAGE_SELF, &rusage); - printf("maxrss: %ld KB\n", rusage.ru_maxrss); + fprintf(stderr, "maxrss: %ld KB\n", rusage.ru_maxrss); #endif } @@ -50,7 +64,7 @@ { struct json_object *obj; char buf32768; - int ret; + ssize_t ret; int depth = JSON_TOKENER_DEFAULT_DEPTH; json_tokener *tok; @@ -73,20 +87,21 @@ size_t total_read = 0; while ((ret = read(fd, buf, sizeof(buf))) > 0) { - total_read += ret; - int start_pos = 0; - while (start_pos != ret) + size_t retu = (size_t)ret; // We know it's positive + total_read += retu; + size_t start_pos = 0; + while (start_pos != retu) { - obj = json_tokener_parse_ex(tok, &bufstart_pos, ret - start_pos); + obj = json_tokener_parse_ex(tok, &bufstart_pos, retu - start_pos); enum json_tokener_error jerr = json_tokener_get_error(tok); - int parse_end = json_tokener_get_parse_end(tok); + size_t parse_end = json_tokener_get_parse_end(tok); if (obj == NULL && jerr != json_tokener_continue) { - char *aterr = (start_pos + parse_end < sizeof(buf)) ? + const char *aterr = (start_pos + parse_end < (int)sizeof(buf)) ? &bufstart_pos + parse_end : ""; fflush(stdout); - int fail_offset = total_read - ret + start_pos + parse_end; - fprintf(stderr, "Failed at offset %d: %s %c\n", fail_offset, + size_t fail_offset = total_read - retu + start_pos + parse_end; + fprintf(stderr, "Failed at offset %lu: %s %c\n", (unsigned long)fail_offset, json_tokener_error_desc(jerr), aterr0); json_tokener_free(tok); return 1; @@ -102,7 +117,7 @@ } } start_pos += json_tokener_get_parse_end(tok); - assert(start_pos <= ret); + assert(start_pos <= retu); } } if (ret < 0) @@ -122,15 +137,12 @@ return 1; } - printf("Successfully parsed object from %s\n", fname); + fprintf(stderr, "Successfully parsed object from %s\n", fname); if (show_output) { const char *output; - if (formatted_output) - output = json_object_to_json_string(new_obj); - else - output = json_object_to_json_string_ext(new_obj, JSON_C_TO_STRING_PRETTY); + output = json_object_to_json_string_ext(new_obj, formatted_output | color); printf("%s\n", output); } @@ -145,11 +157,14 @@ fp = stderr; if (errmsg != NULL) fprintf(fp, "ERROR: %s\n\n", errmsg); - fprintf(fp, "Usage: %s -f -n -s\n", argv0); - fprintf(fp, " -f - Format the output with JSON_C_TO_STRING_PRETTY\n"); + fprintf(fp, "Usage: %s -f|-F <arg> -n -s\n", argv0); + fprintf(fp, " -f - Format the output to stdout with JSON_C_TO_STRING_PRETTY (default is JSON_C_TO_STRING_SPACED)\n"); + fprintf(fp, " -F - Format the output to stdout with <arg>, e.g. 0 for JSON_C_TO_STRING_PLAIN\n"); fprintf(fp, " -n - No output\n"); + fprintf(fp, " -c - color\n"); fprintf(fp, " -s - Parse in strict mode, flags:\n"); fprintf(fp, " JSON_TOKENER_STRICT|JSON_TOKENER_ALLOW_TRAILING_CHARS\n"); + fprintf(fp, " Diagnostic information will be emitted to stderr\n"); fprintf(fp, "\nWARNING WARNING WARNING\n"); fprintf(fp, "This is a prototype, it may change or be removed at any time!\n"); @@ -158,16 +173,17 @@ int main(int argc, char **argv) { - json_object *new_obj; int opt; - while ((opt = getopt(argc, argv, "fhns")) != -1) + while ((opt = getopt(argc, argv, "fF:hnsc")) != -1) { switch (opt) { - case 'f': formatted_output = 1; break; + case 'f': formatted_output = JSON_C_TO_STRING_PRETTY; break; + case 'F': formatted_output = atoi(optarg); break; case 'n': show_output = 0; break; case 's': strict_mode = 1; break; + case 'c': color = JSON_C_TO_STRING_COLOR; break; case 'h': usage(argv0, 0, NULL); default: /* '?' */ usage(argv0, EXIT_FAILURE, "Unknown arguments"); }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/arraylist.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/arraylist.c
Changed
@@ -125,6 +125,27 @@ return 0; } +int array_list_insert_idx(struct array_list *arr, size_t idx, void *data) +{ + size_t move_amount; + + if (idx >= arr->length) + return array_list_put_idx(arr, idx, data); + + /* we're at full size, what size_t can support */ + if (arr->length == SIZE_T_MAX) + return -1; + + if (array_list_expand_internal(arr, arr->length + 1)) + return -1; + + move_amount = (arr->length - idx) * sizeof(void *); + memmove(arr->array + idx + 1, arr->array + idx, move_amount); + arr->arrayidx = data; + arr->length++; + return 0; +} + //static inline int _array_list_put_idx(struct array_list *arr, size_t idx, void *data) int array_list_put_idx(struct array_list *arr, size_t idx, void *data) {
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/arraylist.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/arraylist.h
Changed
@@ -62,6 +62,8 @@ extern void *array_list_get_idx(struct array_list *al, size_t i); +extern int array_list_insert_idx(struct array_list *al, size_t i, void *data); + extern int array_list_put_idx(struct array_list *al, size_t i, void *data); extern int array_list_add(struct array_list *al, void *data);
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/cmake-configure -> _service:tar_scm:json-c-0.17-20230812.tar.gz/cmake-configure
Changed
@@ -65,9 +65,15 @@ --enable-shared) FLAGS+=(-DBUILD_SHARED_LIBS=ON) ;; + --disable-shared) + FLAGS+=(-DBUILD_SHARED_LIBS=OFF) + ;; --enable-static) FLAGS+=(-DBUILD_STATIC_LIBS=ON) ;; + --disable-static) + FLAGS+=(-DBUILD_STATIC_LIBS=OFF) + ;; --disable-Bsymbolic) FLAGS+=(-DDISABLE_BSYMBOLIC=ON) ;;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/cmake/config.h.in -> _service:tar_scm:json-c-0.17-20230812.tar.gz/cmake/config.h.in
Changed
@@ -137,6 +137,9 @@ /* Define to 1 if you have the `uselocale' function. */ #cmakedefine HAVE_USELOCALE +/* Define to 1 if newlocale() needs freelocale() called on it's `base` argument */ +#cmakedefine NEWLOCALE_NEEDS_FREELOCALE + /* Define to 1 if you have the `vasprintf' function. */ #cmakedefine HAVE_VASPRINTF
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/cmake/json_config.h.in -> _service:tar_scm:json-c-0.17-20230812.tar.gz/cmake/json_config.h.in
Changed
@@ -1,2 +1,5 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #cmakedefine JSON_C_HAVE_INTTYPES_H @JSON_C_HAVE_INTTYPES_H@ + +/* Define to 1 if you have the <stdint.h> header file. */ +#cmakedefine JSON_C_HAVE_STDINT_H @JSON_C_HAVE_STDINT_H@
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/Doxyfile.in -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/Doxyfile.in
Changed
@@ -1103,7 +1103,7 @@ # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra stylesheet files is of importance (e.g. the last # stylesheet in the list overrules the setting of the previous ones in the
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/README_8md.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/README_8md.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -49,7 +49,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/annotated.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/annotated.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -51,17 +51,19 @@ <tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structarray__list.html" target="_self">array_list</a></td><td class="desc"></td></tr> <tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__object__iter.html" target="_self">json_object_iter</a></td><td class="desc"></td></tr> <tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__object__iterator.html" target="_self">json_object_iterator</a></td><td class="desc"></td></tr> -<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__tokener.html" target="_self">json_tokener</a></td><td class="desc"></td></tr> -<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__tokener__srec.html" target="_self">json_tokener_srec</a></td><td class="desc"></td></tr> -<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structlh__entry.html" target="_self">lh_entry</a></td><td class="desc"></td></tr> -<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structlh__table.html" target="_self">lh_table</a></td><td class="desc"></td></tr> -<tr id="row_7_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structprintbuf.html" target="_self">printbuf</a></td><td class="desc"></td></tr> +<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__patch__error.html" target="_self">json_patch_error</a></td><td class="desc"></td></tr> +<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__pointer__get__result.html" target="_self">json_pointer_get_result</a></td><td class="desc"></td></tr> +<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__tokener.html" target="_self">json_tokener</a></td><td class="desc"></td></tr> +<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structjson__tokener__srec.html" target="_self">json_tokener_srec</a></td><td class="desc"></td></tr> +<tr id="row_7_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structlh__entry.html" target="_self">lh_entry</a></td><td class="desc"></td></tr> +<tr id="row_8_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structlh__table.html" target="_self">lh_table</a></td><td class="desc"></td></tr> +<tr id="row_9_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structprintbuf.html" target="_self">printbuf</a></td><td class="desc"></td></tr> </table> </div><!-- directory --> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/arraylist_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/arraylist_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -82,6 +82,8 @@ <tr class="separator:acd00fb70f7ca82f23b48b812c3498f67"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a114f1af5b20b76a3dbb2d1d055006df8"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="arraylist_8h.html#a114f1af5b20b76a3dbb2d1d055006df8">array_list_get_idx</a> (struct <a class="el" href="structarray__list.html">array_list</a> *al, size_t i)</td></tr> <tr class="separator:a114f1af5b20b76a3dbb2d1d055006df8"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad6f20316519b3dafec557368ee5c6cf3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="arraylist_8h.html#ad6f20316519b3dafec557368ee5c6cf3">array_list_insert_idx</a> (struct <a class="el" href="structarray__list.html">array_list</a> *al, size_t i, void *data)</td></tr> +<tr class="separator:ad6f20316519b3dafec557368ee5c6cf3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9f92076e9d8229f8a07e536dc286f811"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="arraylist_8h.html#a9f92076e9d8229f8a07e536dc286f811">array_list_put_idx</a> (struct <a class="el" href="structarray__list.html">array_list</a> *al, size_t i, void *data)</td></tr> <tr class="separator:a9f92076e9d8229f8a07e536dc286f811"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6e995608aa464244ff3184fb43574dc8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="arraylist_8h.html#a6e995608aa464244ff3184fb43574dc8">array_list_add</a> (struct <a class="el" href="structarray__list.html">array_list</a> *al, void *data)</td></tr> @@ -270,6 +272,38 @@ </div> </div> +<a class="anchor" id="ad6f20316519b3dafec557368ee5c6cf3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int array_list_insert_idx </td> + <td>(</td> + <td class="paramtype">struct <a class="el" href="structarray__list.html">array_list</a> * </td> + <td class="paramname"><em>al</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>i</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">void * </td> + <td class="paramname"><em>data</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> <a class="anchor" id="aa3bf90f47aa210032304b14e7ad09ef7"></a> <div class="memitem"> <div class="memproto"> @@ -441,7 +475,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/classes.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/classes.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -49,22 +49,22 @@ <div class="qindex"><a class="qindex" href="#letter_A">A</a> | <a class="qindex" href="#letter_J">J</a> | <a class="qindex" href="#letter_L">L</a> | <a class="qindex" href="#letter_P">P</a></div> <table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0"> <tr><td rowspan="2" valign="bottom"><a name="letter_A"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  A  </div></td></tr></table> -</td><td valign="top"><a class="el" href="structjson__object__iterator.html">json_object_iterator</a>   </td><td valign="top"><a class="el" href="structlh__table.html">lh_table</a>   </td><td></td></tr> -<tr><td valign="top"><a class="el" href="structjson__tokener.html">json_tokener</a>   </td><td rowspan="2" valign="bottom"><a name="letter_P"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  P  </div></td></tr></table> +</td><td valign="top"><a class="el" href="structjson__object__iterator.html">json_object_iterator</a>   </td><td valign="top"><a class="el" href="structjson__tokener__srec.html">json_tokener_srec</a>   </td><td valign="top"><a class="el" href="structlh__table.html">lh_table</a>   </td><td></td></tr> +<tr><td valign="top"><a class="el" href="structjson__patch__error.html">json_patch_error</a>   </td><td rowspan="2" valign="bottom"><a name="letter_L"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  L  </div></td></tr></table> +</td><td rowspan="2" valign="bottom"><a name="letter_P"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  P  </div></td></tr></table> </td><td></td></tr> -<tr><td valign="top"><a class="el" href="structarray__list.html">array_list</a>   </td><td valign="top"><a class="el" href="structjson__tokener__srec.html">json_tokener_srec</a>   </td><td></td></tr> +<tr><td valign="top"><a class="el" href="structarray__list.html">array_list</a>   </td><td valign="top"><a class="el" href="structjson__pointer__get__result.html">json_pointer_get_result</a>   </td><td></td></tr> <tr><td rowspan="2" valign="bottom"><a name="letter_J"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  J  </div></td></tr></table> -</td><td rowspan="2" valign="bottom"><a name="letter_L"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  L  </div></td></tr></table> -</td><td valign="top"><a class="el" href="structprintbuf.html">printbuf</a>   </td><td></td></tr> -<tr><td></td><td></td></tr> -<tr><td valign="top"><a class="el" href="structjson__object__iter.html">json_object_iter</a>   </td><td valign="top"><a class="el" href="structlh__entry.html">lh_entry</a>   </td><td></td><td></td></tr> +</td><td valign="top"><a class="el" href="structjson__tokener.html">json_tokener</a>   </td><td valign="top"><a class="el" href="structlh__entry.html">lh_entry</a>   </td><td valign="top"><a class="el" href="structprintbuf.html">printbuf</a>   </td><td></td></tr> <tr><td></td><td></td><td></td><td></td></tr> +<tr><td valign="top"><a class="el" href="structjson__object__iter.html">json_object_iter</a>   </td><td></td><td></td><td></td><td></td></tr> +<tr><td></td><td></td><td></td><td></td><td></td></tr> </table> <div class="qindex"><a class="qindex" href="#letter_A">A</a> | <a class="qindex" href="#letter_J">J</a> | <a class="qindex" href="#letter_L">L</a> | <a class="qindex" href="#letter_P">P</a></div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/deprecated.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/deprecated.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -87,7 +87,7 @@ </div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/dir_b62156a74b5a818be0c2ef9f85294b95.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/dir_b62156a74b5a818be0c2ef9f85294b95.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -54,7 +54,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/files.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/files.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -55,19 +55,21 @@ <tr id="row_3_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__inttypes_8h.html" target="_self">json_inttypes.h</a></td><td class="desc">Do not use, json-c internal, may be changed or removed at any time</td></tr> <tr id="row_4_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__object_8h.html" target="_self">json_object.h</a></td><td class="desc">Core json-c API. Start here, or with <a class="el" href="json__tokener_8h.html" title="Methods to parse an input string into a tree of json_object objects.">json_tokener.h</a></td></tr> <tr id="row_5_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__object__iterator_8h.html" target="_self">json_object_iterator.h</a></td><td class="desc">An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike <a class="el" href="json__object_8h.html#acf5f514a9e0061c10fc08055762639ee">json_object_object_foreach()</a> and <a class="el" href="json__object_8h.html#a71f07006c12d78f7bbf4cb716a5af3a6">json_object_object_foreachC()</a>, this avoids the need to expose json-c internals like <a class="el" href="structlh__entry.html">lh_entry</a></td></tr> -<tr id="row_6_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__pointer_8h.html" target="_self">json_pointer.h</a></td><td class="desc">JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree</td></tr> -<tr id="row_7_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__tokener_8h.html" target="_self">json_tokener.h</a></td><td class="desc">Methods to parse an input string into a tree of json_object objects</td></tr> -<tr id="row_8_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__types_8h.html" target="_self">json_types.h</a></td><td class="desc">Basic types used in a few places in json-c, but you should include "json_object.h" instead</td></tr> -<tr id="row_9_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__util_8h.html" target="_self">json_util.h</a></td><td class="desc">Miscllaneous utility functions and macros</td></tr> -<tr id="row_10_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__visit_8h.html" target="_self">json_visit.h</a></td><td class="desc">Methods for walking a tree of objects</td></tr> -<tr id="row_11_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="linkhash_8h.html" target="_self">linkhash.h</a></td><td class="desc">Internal methods for working with json_type_object objects. Although this is exposed by the <a class="el" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object()</a> function and within the <a class="el" href="structjson__object__iter.html">json_object_iter</a> type, it is not recommended for direct use</td></tr> -<tr id="row_12_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="printbuf_8h.html" target="_self">printbuf.h</a></td><td class="desc">Internal string buffer handling. Unless you're writing a json_object_to_json_string_fn implementation for use with <a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer()</a> direct use of this is not recommended</td></tr> +<tr id="row_6_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__patch_8h.html" target="_self">json_patch.h</a></td><td class="desc">JSON Patch (RFC 6902) implementation for manipulating JSON objects</td></tr> +<tr id="row_7_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__pointer_8h.html" target="_self">json_pointer.h</a></td><td class="desc">JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree</td></tr> +<tr id="row_8_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__pointer__private_8h.html" target="_self">json_pointer_private.h</a></td><td class="desc">Do not use, json-c internal, may be changed or removed at any time</td></tr> +<tr id="row_9_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__tokener_8h.html" target="_self">json_tokener.h</a></td><td class="desc">Methods to parse an input string into a tree of json_object objects</td></tr> +<tr id="row_10_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__types_8h.html" target="_self">json_types.h</a></td><td class="desc">Basic types used in a few places in json-c, but you should include "json_object.h" instead</td></tr> +<tr id="row_11_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__util_8h.html" target="_self">json_util.h</a></td><td class="desc">Miscllaneous utility functions and macros</td></tr> +<tr id="row_12_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__visit_8h.html" target="_self">json_visit.h</a></td><td class="desc">Methods for walking a tree of objects</td></tr> +<tr id="row_13_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="linkhash_8h.html" target="_self">linkhash.h</a></td><td class="desc">Internal methods for working with json_type_object objects. Although this is exposed by the <a class="el" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object()</a> function and within the <a class="el" href="structjson__object__iter.html">json_object_iter</a> type, it is not recommended for direct use</td></tr> +<tr id="row_14_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="printbuf_8h.html" target="_self">printbuf.h</a></td><td class="desc">Internal string buffer handling. Unless you're writing a json_object_to_json_string_fn implementation for use with <a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer()</a> direct use of this is not recommended</td></tr> </table> </div><!-- directory --> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/functions.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/functions.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -120,6 +120,12 @@ <li>err : <a class="el" href="structjson__tokener.html#adef37cdc2578d8f8920db14315728cbd">json_tokener</a> </li> +<li>errmsg +: <a class="el" href="structjson__patch__error.html#a6c7bdff0bc64ac7eb84224c3c6be3361">json_patch_error</a> +</li> +<li>errno_code +: <a class="el" href="structjson__patch__error.html#a80d2ee1f1d8ee4c1923e4c5a81950ac3">json_patch_error</a> +</li> </ul> @@ -148,6 +154,9 @@ <h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>index_in_parent +: <a class="el" href="structjson__pointer__get__result.html#ab4018de1d0573e9db323ba0627da6ab1">json_pointer_get_result</a> +</li> <li>is_double : <a class="el" href="structjson__tokener.html#ad3bf0aa728ea14549d5aa6ca8dcba070">json_tokener</a> </li> @@ -164,6 +173,9 @@ <li>key : <a class="el" href="structjson__object__iter.html#a0b76228b3a039075e9d84f88fa72ff53">json_object_iter</a> </li> +<li>key_in_parent +: <a class="el" href="structjson__pointer__get__result.html#a09096a029acda753531551ea2548db6a">json_pointer_get_result</a> +</li> </ul> @@ -190,7 +202,8 @@ <h3><a class="anchor" id="index_o"></a>- o -</h3><ul> <li>obj -: <a class="el" href="structjson__tokener__srec.html#ad2bb71affec1da5ba1d9952c3bf2c12a">json_tokener_srec</a> +: <a class="el" href="structjson__pointer__get__result.html#a9919695cf5fd827e14b843d22b222d8b">json_pointer_get_result</a> +, <a class="el" href="structjson__tokener__srec.html#ad2bb71affec1da5ba1d9952c3bf2c12a">json_tokener_srec</a> </li> <li>obj_field_name : <a class="el" href="structjson__tokener__srec.html#a99551c172e97ac2e7a3849a50b4f51ca">json_tokener_srec</a> @@ -202,6 +215,12 @@ <h3><a class="anchor" id="index_p"></a>- p -</h3><ul> +<li>parent +: <a class="el" href="structjson__pointer__get__result.html#adba314387ced3bef96877d8cf756b087">json_pointer_get_result</a> +</li> +<li>patch_failure_idx +: <a class="el" href="structjson__patch__error.html#a25a3684349fc0a52585511eb734ecb7a">json_patch_error</a> +</li> <li>pb : <a class="el" href="structjson__tokener.html#a1cdc7f85d7bde95f81bb08b7e61d6684">json_tokener</a> </li> @@ -267,7 +286,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/functions_vars.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/functions_vars.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -120,6 +120,12 @@ <li>err : <a class="el" href="structjson__tokener.html#adef37cdc2578d8f8920db14315728cbd">json_tokener</a> </li> +<li>errmsg +: <a class="el" href="structjson__patch__error.html#a6c7bdff0bc64ac7eb84224c3c6be3361">json_patch_error</a> +</li> +<li>errno_code +: <a class="el" href="structjson__patch__error.html#a80d2ee1f1d8ee4c1923e4c5a81950ac3">json_patch_error</a> +</li> </ul> @@ -148,6 +154,9 @@ <h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>index_in_parent +: <a class="el" href="structjson__pointer__get__result.html#ab4018de1d0573e9db323ba0627da6ab1">json_pointer_get_result</a> +</li> <li>is_double : <a class="el" href="structjson__tokener.html#ad3bf0aa728ea14549d5aa6ca8dcba070">json_tokener</a> </li> @@ -164,6 +173,9 @@ <li>key : <a class="el" href="structjson__object__iter.html#a0b76228b3a039075e9d84f88fa72ff53">json_object_iter</a> </li> +<li>key_in_parent +: <a class="el" href="structjson__pointer__get__result.html#a09096a029acda753531551ea2548db6a">json_pointer_get_result</a> +</li> </ul> @@ -190,7 +202,8 @@ <h3><a class="anchor" id="index_o"></a>- o -</h3><ul> <li>obj -: <a class="el" href="structjson__tokener__srec.html#ad2bb71affec1da5ba1d9952c3bf2c12a">json_tokener_srec</a> +: <a class="el" href="structjson__pointer__get__result.html#a9919695cf5fd827e14b843d22b222d8b">json_pointer_get_result</a> +, <a class="el" href="structjson__tokener__srec.html#ad2bb71affec1da5ba1d9952c3bf2c12a">json_tokener_srec</a> </li> <li>obj_field_name : <a class="el" href="structjson__tokener__srec.html#a99551c172e97ac2e7a3849a50b4f51ca">json_tokener_srec</a> @@ -202,6 +215,12 @@ <h3><a class="anchor" id="index_p"></a>- p -</h3><ul> +<li>parent +: <a class="el" href="structjson__pointer__get__result.html#adba314387ced3bef96877d8cf756b087">json_pointer_get_result</a> +</li> +<li>patch_failure_idx +: <a class="el" href="structjson__patch__error.html#a25a3684349fc0a52585511eb734ecb7a">json_patch_error</a> +</li> <li>pb : <a class="el" href="structjson__tokener.html#a1cdc7f85d7bde95f81bb08b7e61d6684">json_tokener</a> </li> @@ -267,7 +286,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -54,10 +54,12 @@ <div id="navrow4" class="tabs3"> <ul class="tablist"> <li class="current"><a href="globals.html#index_a"><span>a</span></a></li> + <li><a href="globals_0x69.html#index_i"><span>i</span></a></li> <li><a href="globals_0x6a.html#index_j"><span>j</span></a></li> <li><a href="globals_0x6c.html#index_l"><span>l</span></a></li> <li><a href="globals_0x70.html#index_p"><span>p</span></a></li> <li><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li><a href="globals_0x75.html#index_u"><span>u</span></a></li> </ul> </div> </div><!-- top --> @@ -89,6 +91,9 @@ <li>array_list_get_idx() : <a class="el" href="arraylist_8h.html#a114f1af5b20b76a3dbb2d1d055006df8">arraylist.h</a> </li> +<li>array_list_insert_idx() +: <a class="el" href="arraylist_8h.html#ad6f20316519b3dafec557368ee5c6cf3">arraylist.h</a> +</li> <li>array_list_length() : <a class="el" href="arraylist_8h.html#aa3bf90f47aa210032304b14e7ad09ef7">arraylist.h</a> </li> @@ -111,7 +116,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_0x69.html
Added
@@ -0,0 +1,85 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> + <div id="navrow4" class="tabs3"> + <ul class="tablist"> + <li><a href="globals.html#index_a"><span>a</span></a></li> + <li class="current"><a href="globals_0x69.html#index_i"><span>i</span></a></li> + <li><a href="globals_0x6a.html#index_j"><span>j</span></a></li> + <li><a href="globals_0x6c.html#index_l"><span>l</span></a></li> + <li><a href="globals_0x70.html#index_p"><span>p</span></a></li> + <li><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li><a href="globals_0x75.html#index_u"><span>u</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="contents"> +<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div> + +<h3><a class="anchor" id="index_i"></a>- i -</h3><ul> +<li>int32_t +: <a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">json_inttypes.h</a> +</li> +<li>int64_t +: <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">json_inttypes.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_0x6a.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_0x6a.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -54,10 +54,12 @@ <div id="navrow4" class="tabs3"> <ul class="tablist"> <li><a href="globals.html#index_a"><span>a</span></a></li> + <li><a href="globals_0x69.html#index_i"><span>i</span></a></li> <li class="current"><a href="globals_0x6a.html#index_j"><span>j</span></a></li> <li><a href="globals_0x6c.html#index_l"><span>l</span></a></li> <li><a href="globals_0x70.html#index_p"><span>p</span></a></li> <li><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li><a href="globals_0x75.html#index_u"><span>u</span></a></li> </ul> </div> </div><!-- top --> @@ -113,6 +115,9 @@ <li>JSON_C_STR_HASH_PERLLIKE : <a class="el" href="linkhash_8h.html#a62316f34fd42941b97a8e9a6b6e68faa">linkhash.h</a> </li> +<li>JSON_C_TO_STRING_COLOR +: <a class="el" href="json__object_8h.html#a195258c9acc1f8a216d7c9528b00d450">json_object.h</a> +</li> <li>JSON_C_TO_STRING_NOSLASHESCAPE : <a class="el" href="json__object_8h.html#a5c11d72c55f3ab7c088f19e7bf118163">json_object.h</a> </li> @@ -199,6 +204,9 @@ <li>json_object_array_get_idx() : <a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object.h</a> </li> +<li>json_object_array_insert_idx() +: <a class="el" href="json__object_8h.html#ae40a00944afd41c9a463c6d9e8256f3b">json_object.h</a> +</li> <li>json_object_array_length() : <a class="el" href="json__object_8h.html#ab9ea8f9c72d5adf83fdcbfe69f97fa44">json_object.h</a> </li> @@ -427,15 +435,27 @@ <li>json_parse_uint64() : <a class="el" href="json__util_8h.html#a94c2340c1344d57f7aa067f2dd0407f9">json_util.h</a> </li> +<li>json_patch_apply() +: <a class="el" href="json__patch_8h.html#a134aaed1e732d029d34ce2d605f9ac8d">json_patch.h</a> +</li> +<li>json_pointer_array_set_cb +: <a class="el" href="json__pointer__private_8h.html#abd9b2aa5dba43055f07b69a5060bede3">json_pointer_private.h</a> +</li> <li>json_pointer_get() : <a class="el" href="json__pointer_8h.html#aff88937e32b0ba6ffbd07cb4b1919053">json_pointer.h</a> </li> +<li>json_pointer_get_internal() +: <a class="el" href="json__pointer__private_8h.html#a0de79c3e3e33f897ba9db340d7372b64">json_pointer_private.h</a> +</li> <li>json_pointer_getf() : <a class="el" href="json__pointer_8h.html#af0ac03df64b215d05041e8007ed0233d">json_pointer.h</a> </li> <li>json_pointer_set() : <a class="el" href="json__pointer_8h.html#aef0e651f63ce5ce35648503705e2586b">json_pointer.h</a> </li> +<li>json_pointer_set_with_array_cb() +: <a class="el" href="json__pointer__private_8h.html#a0ac7b6b8de2336f8cd463687d7c148d2">json_pointer_private.h</a> +</li> <li>json_pointer_setf() : <a class="el" href="json__pointer_8h.html#a66f1f98a2ce085c19f6750193b4c726d">json_pointer.h</a> </li> @@ -460,6 +480,9 @@ <li>json_tokener_error_desc() : <a class="el" href="json__tokener_8h.html#af060dd6b593b3b710044bcb97dcec07f">json_tokener.h</a> </li> +<li>json_tokener_error_memory +: <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a23ecf6536cfbfb48781fd7874eef59a0">json_tokener.h</a> +</li> <li>json_tokener_error_parse_array : <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a574846740b785146f164a209dc89574e">json_tokener.h</a> </li> @@ -623,7 +646,7 @@ : <a class="el" href="json__tokener_8h.html#a633ab043f2b07fd22420af2b369a260a">json_tokener.h</a> </li> <li>json_type -: <a class="el" href="json__types_8h.html#ac75c61993722a9b8aaa44704072ec06c">json_types.h</a> +: <a class="el" href="json__types_8h.html#aba5eff84f8638d22f50403175f270c96">json_types.h</a> </li> <li>json_type_array : <a class="el" href="json__types_8h.html#ac75c61993722a9b8aaa44704072ec06cae536c8c9da4648e6b9348abddde6113c">json_types.h</a> @@ -656,7 +679,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_0x6c.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_0x6c.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -54,10 +54,12 @@ <div id="navrow4" class="tabs3"> <ul class="tablist"> <li><a href="globals.html#index_a"><span>a</span></a></li> + <li><a href="globals_0x69.html#index_i"><span>i</span></a></li> <li><a href="globals_0x6a.html#index_j"><span>j</span></a></li> <li class="current"><a href="globals_0x6c.html#index_l"><span>l</span></a></li> <li><a href="globals_0x70.html#index_p"><span>p</span></a></li> <li><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li><a href="globals_0x75.html#index_u"><span>u</span></a></li> </ul> </div> </div><!-- top --> @@ -162,7 +164,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_0x70.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_0x70.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -54,10 +54,12 @@ <div id="navrow4" class="tabs3"> <ul class="tablist"> <li><a href="globals.html#index_a"><span>a</span></a></li> + <li><a href="globals_0x69.html#index_i"><span>i</span></a></li> <li><a href="globals_0x6a.html#index_j"><span>j</span></a></li> <li><a href="globals_0x6c.html#index_l"><span>l</span></a></li> <li class="current"><a href="globals_0x70.html#index_p"><span>p</span></a></li> <li><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li><a href="globals_0x75.html#index_u"><span>u</span></a></li> </ul> </div> </div><!-- top --> @@ -102,7 +104,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_0x73.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_0x73.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -54,10 +54,12 @@ <div id="navrow4" class="tabs3"> <ul class="tablist"> <li><a href="globals.html#index_a"><span>a</span></a></li> + <li><a href="globals_0x69.html#index_i"><span>i</span></a></li> <li><a href="globals_0x6a.html#index_j"><span>j</span></a></li> <li><a href="globals_0x6c.html#index_l"><span>l</span></a></li> <li><a href="globals_0x70.html#index_p"><span>p</span></a></li> <li class="current"><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li><a href="globals_0x75.html#index_u"><span>u</span></a></li> </ul> </div> </div><!-- top --> @@ -75,7 +77,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_0x75.html
Added
@@ -0,0 +1,85 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: Globals</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li class="current"><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> + <div id="navrow3" class="tabs2"> + <ul class="tablist"> + <li class="current"><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_func.html"><span>Functions</span></a></li> + <li><a href="globals_vars.html"><span>Variables</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Macros</span></a></li> + </ul> + </div> + <div id="navrow4" class="tabs3"> + <ul class="tablist"> + <li><a href="globals.html#index_a"><span>a</span></a></li> + <li><a href="globals_0x69.html#index_i"><span>i</span></a></li> + <li><a href="globals_0x6a.html#index_j"><span>j</span></a></li> + <li><a href="globals_0x6c.html#index_l"><span>l</span></a></li> + <li><a href="globals_0x70.html#index_p"><span>p</span></a></li> + <li><a href="globals_0x73.html#index_s"><span>s</span></a></li> + <li class="current"><a href="globals_0x75.html#index_u"><span>u</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="contents"> +<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div> + +<h3><a class="anchor" id="index_u"></a>- u -</h3><ul> +<li>uint32_t +: <a class="el" href="json__inttypes_8h.html#a6eb1e68cc391dd753bc8ce896dbb8315">json_inttypes.h</a> +</li> +<li>uint64_t +: <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">json_inttypes.h</a> +</li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_defs.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_defs.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -105,6 +105,9 @@ <li>JSON_C_STR_HASH_PERLLIKE : <a class="el" href="linkhash_8h.html#a62316f34fd42941b97a8e9a6b6e68faa">linkhash.h</a> </li> +<li>JSON_C_TO_STRING_COLOR +: <a class="el" href="json__object_8h.html#a195258c9acc1f8a216d7c9528b00d450">json_object.h</a> +</li> <li>JSON_C_TO_STRING_NOSLASHESCAPE : <a class="el" href="json__object_8h.html#a5c11d72c55f3ab7c088f19e7bf118163">json_object.h</a> </li> @@ -149,8 +152,8 @@ </li> <li>JSON_EXPORT : <a class="el" href="json__types_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">json_types.h</a> -, <a class="el" href="json__c__version_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">json_c_version.h</a> , <a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">printbuf.h</a> +, <a class="el" href="json__c__version_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">json_c_version.h</a> </li> <li>JSON_FILE_BUF_SIZE : <a class="el" href="json__util_8h.html#a084b6afc8f7fbef88976aabe4aca7efd">json_util.h</a> @@ -234,7 +237,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_enum.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_enum.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -67,7 +67,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_eval.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_eval.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -67,6 +67,9 @@ <li>json_tokener_error_depth : <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a59b2c36d9cc30c3038e09b9ddee6c86c">json_tokener.h</a> </li> +<li>json_tokener_error_memory +: <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a23ecf6536cfbfb48781fd7874eef59a0">json_tokener.h</a> +</li> <li>json_tokener_error_parse_array : <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a574846740b785146f164a209dc89574e">json_tokener.h</a> </li> @@ -215,7 +218,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_func.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_func.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -80,6 +80,9 @@ <li>array_list_get_idx() : <a class="el" href="arraylist_8h.html#a114f1af5b20b76a3dbb2d1d055006df8">arraylist.h</a> </li> +<li>array_list_insert_idx() +: <a class="el" href="arraylist_8h.html#ad6f20316519b3dafec557368ee5c6cf3">arraylist.h</a> +</li> <li>array_list_length() : <a class="el" href="arraylist_8h.html#aa3bf90f47aa210032304b14e7ad09ef7">arraylist.h</a> </li> @@ -132,6 +135,9 @@ <li>json_object_array_get_idx() : <a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object.h</a> </li> +<li>json_object_array_insert_idx() +: <a class="el" href="json__object_8h.html#ae40a00944afd41c9a463c6d9e8256f3b">json_object.h</a> +</li> <li>json_object_array_length() : <a class="el" href="json__object_8h.html#ab9ea8f9c72d5adf83fdcbfe69f97fa44">json_object.h</a> </li> @@ -336,15 +342,24 @@ <li>json_parse_uint64() : <a class="el" href="json__util_8h.html#a94c2340c1344d57f7aa067f2dd0407f9">json_util.h</a> </li> +<li>json_patch_apply() +: <a class="el" href="json__patch_8h.html#a134aaed1e732d029d34ce2d605f9ac8d">json_patch.h</a> +</li> <li>json_pointer_get() : <a class="el" href="json__pointer_8h.html#aff88937e32b0ba6ffbd07cb4b1919053">json_pointer.h</a> </li> +<li>json_pointer_get_internal() +: <a class="el" href="json__pointer__private_8h.html#a0de79c3e3e33f897ba9db340d7372b64">json_pointer_private.h</a> +</li> <li>json_pointer_getf() : <a class="el" href="json__pointer_8h.html#af0ac03df64b215d05041e8007ed0233d">json_pointer.h</a> </li> <li>json_pointer_set() : <a class="el" href="json__pointer_8h.html#aef0e651f63ce5ce35648503705e2586b">json_pointer.h</a> </li> +<li>json_pointer_set_with_array_cb() +: <a class="el" href="json__pointer__private_8h.html#a0ac7b6b8de2336f8cd463687d7c148d2">json_pointer_private.h</a> +</li> <li>json_pointer_setf() : <a class="el" href="json__pointer_8h.html#a66f1f98a2ce085c19f6750193b4c726d">json_pointer.h</a> </li> @@ -484,7 +499,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_type.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_type.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -60,6 +60,12 @@ <li>array_list_free_fn : <a class="el" href="arraylist_8h.html#aad83e4ed3c8ea274e6f18459276d774b">arraylist.h</a> </li> +<li>int32_t +: <a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">json_inttypes.h</a> +</li> +<li>int64_t +: <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">json_inttypes.h</a> +</li> <li>json_bool : <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_types.h</a> </li> @@ -81,6 +87,9 @@ <li>json_object_to_json_string_fn : <a class="el" href="json__types_8h.html#af84078100a9025df418f31626ea866fa">json_types.h</a> </li> +<li>json_pointer_array_set_cb +: <a class="el" href="json__pointer__private_8h.html#abd9b2aa5dba43055f07b69a5060bede3">json_pointer_private.h</a> +</li> <li>json_tokener : <a class="el" href="json__tokener_8h.html#a4dd5e5b65aee7f376f529f86b210ff49">json_tokener.h</a> </li> @@ -102,11 +111,17 @@ <li>printbuf : <a class="el" href="printbuf_8h.html#ace274df280df67463ff417b1b3392395">printbuf.h</a> </li> +<li>uint32_t +: <a class="el" href="json__inttypes_8h.html#a6eb1e68cc391dd753bc8ce896dbb8315">json_inttypes.h</a> +</li> +<li>uint64_t +: <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">json_inttypes.h</a> +</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/globals_vars.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/globals_vars.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -67,7 +67,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/index.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/index.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -43,6 +43,7 @@ <div class="textblock"><h1><code>json-c</code></h1> <ol type="1"> <li><a href="#overview">Overview and Build Status</a></li> +<li><a href="#gettinghelp">Getting Help</a></li> <li><a href="#buildunix">Building on Unix</a><ul> <li><a href="#installprereq">Prerequisites</a></li> <li><a href="#buildcmds">Build commands</a></li> @@ -51,21 +52,30 @@ <li><a href="#CMake">CMake options</a></li> <li><a href="#testing">Testing</a></li> <li><a href="#buildvcpkg">Building with `vcpkg`</a></li> +<li><a href="#android">Building for Android</a></li> +</ol> +<ol type="1"> <li><a href="#linking">Linking to libjson-c</a></li> <li><a href="#using">Using json-c</a></li> </ol> <h2>JSON-C - A JSON implementation in C <a class="anchor" id="overview"></a></h2> -<p>JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects. It aims to conform to <a href="https://tools.ietf.org/html/rfc7159">RFC 7159</a>.</p> +<p>JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects. It aims to conform to <a href="https://www.rfc-editor.org/rfc/rfc8259">RFC 8259</a>.</p> <p>Skip down to <a href="#using">Using json-c</a> or check out the <a href="https://json-c.github.io/json-c/">API docs</a>, if you already have json-c installed and ready to use.</p> <p>Home page for json-c: <a href="https://github.com/json-c/json-c/wiki">https://github.com/json-c/json-c/wiki</a></p> +<h2>Getting Help <a class="anchor" id="gettinghelp"></a></h2> +<p>If you have questions about using json-c, please start a thread on our forums at: <a href="https://groups.google.com/forum/#!forum/json-c">https://groups.google.com/forum/#!forum/json-c</a></p> +<p>If you believe you've discovered a bug, report it at (<a href="https://github.com/json-c/json-c/issues">https://github.com/json-c/json-c/issues</a>). Please be sure to include the version of json-c you're using, the OS you're running on, and any other relevant details. Fully reproducible test cases and/or patches to fix problems are greatly appreciated.</p> +<p>Fixes for bugs, or small new features can be directly submitted as a <a href="https://github.com/json-c/json-c/pulls">pull request</a>. For major new features or large changes of any kind, please first start a discussion on the <a href="https://groups.google.com/forum/#!forum/json-c">forums</a>.</p> +<h2>Building on Unix with <code>git</code>, <code>gcc</code> and <code>cmake</code> <a class="anchor" id="buildunix"></a></h2> +<p>If you already have json-c installed, see <a href="#linking">Linking to `libjson-c`</a> for how to build and link your program against it.</p> <p>Build Status</p> <ul> <li><a href="https://ci.appveyor.com/project/hawicz/json-c">AppVeyor Build</a> <div class="image"> <img src="https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true" alt="AppVeyor Build Status"/> </div> </li> -<li><a href="https://travis-ci.org/json-c/json-c">Travis Build</a> <div class="image"> -<img src="https://travis-ci.org/json-c/json-c.svg?branch=master" alt="Travis Build Status"/> +<li><a href="https://app.travis-ci.com/github/json-c/json-c">Travis Build</a> <div class="image"> +<img src="https://api.travis-ci.com/json-c/json-c.svg?branch=master" alt="Travis Build Status"/> </div> </li> </ul> @@ -73,8 +83,6 @@ <ul> <li><a href="https://coveralls.io/github/json-c/json-c?branch=master">Coveralls</a> <a href="https://coveralls.io/github/json-c/json-c?branch=master">!Coverage Status(https://coveralls.io/repos/github/json-c/json-c/badge.svg?branch=master)</a></li> </ul> -<h2>Building on Unix with <code>git</code>, <code>gcc</code> and <code>cmake</code> <a class="anchor" id="buildunix"></a></h2> -<p>If you already have json-c installed, see <a href="#linking">Linking to `libjson-c`</a> for how to build and link your program against it.</p> <h3>Prerequisites: <a class="anchor" id="installprereq"></a></h3> <ul> <li><code>gcc</code>, <code>clang</code>, or another C compiler</li> @@ -103,7 +111,7 @@ <pre class="fragment">$ make $ make test $ make USE_VALGRIND=0 test # optionally skip using valgrind -$ make install +$ sudo make install # it could be necessary to execute make install </pre><h3>Generating documentation with Doxygen:</h3> <p>The library documentation can be generated directly from the source code using Doxygen tool: </p> <pre class="fragment"># in build directory @@ -131,6 +139,10 @@ <tr> <td>DISABLE_WERROR </td><td>Bool </td><td>Disable use of -Werror. </td></tr> <tr> +<td>DISABLE_EXTRA_LIBS </td><td>Bool </td><td>Disable use of extra libraries, libbsd </td></tr> +<tr> +<td>DISABLE_JSON_POINTER </td><td>Bool </td><td>Omit json_pointer support from the build. </td></tr> +<tr> <td>ENABLE_RDRAND </td><td>Bool </td><td>Enable RDRAND Hardware RNG Hash Seed. </td></tr> <tr> <td>ENABLE_THREADING </td><td>Bool </td><td>Enable partial threading support. </td></tr> @@ -196,7 +208,23 @@ ./vcpkg integrate install vcpkg install json-c </pre><p>The JSON-C port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please <a href="https://github.com/Microsoft/vcpkg">create an issue or pull request</a> on the vcpkg repository.</p> -<h2>Linking to <code>libjson-c</code> <a class="anchor" id="linking"></a></h2> +<h2>Building for Android <a class="anchor" id="android"></a></h2> +<p>Building on Android is now particularly well supported, but there have been some reports of success using <a href="https://developer.android.com/ndk/guides/cmake">https://developer.android.com/ndk/guides/cmake</a> </p> +<pre class="fragment">mkdir json-c-build +cd json-c-build/ +export NDK_HOME=~/Library/Android/sdk/ndk/22.1.7171670/ +cmake \ + --toolchain=$NDK_HOME/build/cmake/android.toolchain.cmake \ + -DANDROID_STL=none \ + -DANDROID_ABI=arm64-v8a \ + -DANDROID_PLATFORM=android-29 \ + -DANDROID_LD=lld \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=<install prefix> \ + -DENABLE_THREADING=true \ + .. +make install +</pre><h2>Linking to <code>libjson-c</code> <a class="anchor" id="linking"></a></h2> <p>If your system has <code>pkgconfig</code>, then you can just add this to your <code>makefile</code>: </p> <pre class="fragment">CFLAGS += $(shell pkg-config --cflags json-c) LDFLAGS += $(shell pkg-config --libs json-c) @@ -235,7 +263,7 @@ </div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/issues__closed__for__0_813_8md.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/issues__closed__for__0_813_8md.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -49,7 +49,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/issues__closed__for__0_814_8md.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/issues__closed__for__0_814_8md.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -49,7 +49,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/issues__closed__for__0_815_8md.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/issues__closed__for__0_815_8md.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -49,7 +49,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/issues__closed__for__0_816_8md.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/issues__closed__for__0_816_8md.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -49,7 +49,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/issues__closed__for__0_817_8md.html
Added
@@ -0,0 +1,57 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: issues_closed_for_0.17.md File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">issues_closed_for_0.17.md File Reference</div> </div> +</div><!--header--> +<div class="contents"> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -58,7 +58,7 @@ </div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__c__version_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__c__version_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -57,13 +57,13 @@ Macros</h2></td></tr> <tr class="memitem:a251c3e1f59a379a4a905382b4e855125"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a251c3e1f59a379a4a905382b4e855125">JSON_C_MAJOR_VERSION</a>   0</td></tr> <tr class="separator:a251c3e1f59a379a4a905382b4e855125"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a>   16</td></tr> +<tr class="memitem:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a>   17</td></tr> <tr class="separator:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a64457730097067ab096906d82e4a51a6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a64457730097067ab096906d82e4a51a6">JSON_C_MICRO_VERSION</a>   0</td></tr> <tr class="separator:a64457730097067ab096906d82e4a51a6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a78e176eee75ee6aed43c4d65ca4c5b44"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a78e176eee75ee6aed43c4d65ca4c5b44">JSON_C_VERSION_NUM</a>   ((<a class="el" href="json__c__version_8h.html#a251c3e1f59a379a4a905382b4e855125">JSON_C_MAJOR_VERSION</a> << 16) | (<a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a> << 8) | <a class="el" href="json__c__version_8h.html#a64457730097067ab096906d82e4a51a6">JSON_C_MICRO_VERSION</a>)</td></tr> <tr class="separator:a78e176eee75ee6aed43c4d65ca4c5b44"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a894adda66a072bc3fd34ebe91a5aa7f4">JSON_C_VERSION</a>   "0.16"</td></tr> +<tr class="memitem:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a894adda66a072bc3fd34ebe91a5aa7f4">JSON_C_VERSION</a>   "0.17"</td></tr> <tr class="separator:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2a31d5c00f3a4712f2d5d62aee66344e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a>   extern</td></tr> <tr class="separator:a2a31d5c00f3a4712f2d5d62aee66344e"><td class="memSeparator" colspan="2"> </td></tr> @@ -107,7 +107,7 @@ <div class="memproto"> <table class="memname"> <tr> - <td class="memname">#define JSON_C_MINOR_VERSION   16</td> + <td class="memname">#define JSON_C_MINOR_VERSION   17</td> </tr> </table> </div><div class="memdoc"> @@ -119,7 +119,7 @@ <div class="memproto"> <table class="memname"> <tr> - <td class="memname">#define JSON_C_VERSION   "0.16"</td> + <td class="memname">#define JSON_C_VERSION   "0.17"</td> </tr> </table> </div><div class="memdoc"> @@ -191,7 +191,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__inttypes_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__inttypes_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -43,7 +43,8 @@ </div><!-- top --> <div class="header"> <div class="summary"> -<a href="#define-members">Macros</a> </div> +<a href="#define-members">Macros</a> | +<a href="#typedef-members">Typedefs</a> </div> <div class="headertitle"> <div class="title">json_inttypes.h File Reference</div> </div> </div><!--header--> @@ -60,6 +61,17 @@ <tr class="separator:ae7044b3fb4cc5cde22155d59437c348f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac582131d7a7c8ee57e73180d1714f9d5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__inttypes_8h.html#ac582131d7a7c8ee57e73180d1714f9d5">PRIu64</a>   "I64u"</td></tr> <tr class="separator:ac582131d7a7c8ee57e73180d1714f9d5"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:a37994e3b11c72957c6f454c6ec96d43d"><td class="memItemLeft" align="right" valign="top">typedef __int32 </td><td class="memItemRight" valign="bottom"><a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">int32_t</a></td></tr> +<tr class="separator:a37994e3b11c72957c6f454c6ec96d43d"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a6eb1e68cc391dd753bc8ce896dbb8315"><td class="memItemLeft" align="right" valign="top">typedef unsigned __int32 </td><td class="memItemRight" valign="bottom"><a class="el" href="json__inttypes_8h.html#a6eb1e68cc391dd753bc8ce896dbb8315">uint32_t</a></td></tr> +<tr class="separator:a6eb1e68cc391dd753bc8ce896dbb8315"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a67a9885ef4908cb72ce26d75b694386c"><td class="memItemLeft" align="right" valign="top">typedef __int64 </td><td class="memItemRight" valign="bottom"><a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a></td></tr> +<tr class="separator:a67a9885ef4908cb72ce26d75b694386c"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aec6fcb673ff035718c238c8c9d544c47"><td class="memItemLeft" align="right" valign="top">typedef unsigned __int64 </td><td class="memItemRight" valign="bottom"><a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a></td></tr> +<tr class="separator:aec6fcb673ff035718c238c8c9d544c47"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Do not use, json-c internal, may be changed or removed at any time. </p> @@ -100,10 +112,59 @@ </div> </div> +<h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="a37994e3b11c72957c6f454c6ec96d43d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef __int32 <a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">int32_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a67a9885ef4908cb72ce26d75b694386c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef __int64 <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a6eb1e68cc391dd753bc8ce896dbb8315"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef unsigned __int32 <a class="el" href="json__inttypes_8h.html#a6eb1e68cc391dd753bc8ce896dbb8315">uint32_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="aec6fcb673ff035718c238c8c9d544c47"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef unsigned __int64 <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__object_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__object_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -73,6 +73,8 @@ <tr class="separator:a34f027c147babf69fc530d088f2b49b0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5c11d72c55f3ab7c088f19e7bf118163"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a5c11d72c55f3ab7c088f19e7bf118163">JSON_C_TO_STRING_NOSLASHESCAPE</a>   (1 << 4)</td></tr> <tr class="separator:a5c11d72c55f3ab7c088f19e7bf118163"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a195258c9acc1f8a216d7c9528b00d450"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a195258c9acc1f8a216d7c9528b00d450">JSON_C_TO_STRING_COLOR</a>   (1 << 5)</td></tr> +<tr class="separator:a195258c9acc1f8a216d7c9528b00d450"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8cd01c484155ac99043a35b7c85ae411"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">JSON_C_OBJECT_ADD_KEY_IS_NEW</a>   (1 << 1)</td></tr> <tr class="separator:a8cd01c484155ac99043a35b7c85ae411"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4d303af657ca4ee8e487366ba9692c94"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a4d303af657ca4ee8e487366ba9692c94">JSON_C_OBJECT_ADD_CONSTANT_KEY</a>   (1 << 2)</td></tr> @@ -149,6 +151,8 @@ <tr class="separator:a18cdd9a7455e09f36cdf6e5756b7f586"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1ac0ccdbc13a25da7d8b2dc9e421dfad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a1ac0ccdbc13a25da7d8b2dc9e421dfad">json_object_array_put_idx</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr> <tr class="separator:a1ac0ccdbc13a25da7d8b2dc9e421dfad"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ae40a00944afd41c9a463c6d9e8256f3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae40a00944afd41c9a463c6d9e8256f3b">json_object_array_insert_idx</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr> +<tr class="separator:ae40a00944afd41c9a463c6d9e8256f3b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a676711a76545d4ec65cc75f100f5fd19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx)</td></tr> <tr class="separator:a676711a76545d4ec65cc75f100f5fd19"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a722eca9f578704d3af38b97549242c1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx, size_t count)</td></tr> @@ -161,25 +165,25 @@ <tr class="separator:ac003fb99db7ecd674bb16d983d2f92ee"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a23863c1503f3a8dd8a460a6405da0a65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a23863c1503f3a8dd8a460a6405da0a65">json_object_set_boolean</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> new_value)</td></tr> <tr class="separator:a23863c1503f3a8dd8a460a6405da0a65"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ae92f0770fb4b3c884ce35de52d3d7de8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae92f0770fb4b3c884ce35de52d3d7de8">json_object_new_int</a> (int32_t i)</td></tr> +<tr class="memitem:ae92f0770fb4b3c884ce35de52d3d7de8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae92f0770fb4b3c884ce35de52d3d7de8">json_object_new_int</a> (<a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">int32_t</a> i)</td></tr> <tr class="separator:ae92f0770fb4b3c884ce35de52d3d7de8"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a7847f74494645c2b076505c37cc4cb93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7847f74494645c2b076505c37cc4cb93">json_object_new_int64</a> (int64_t i)</td></tr> +<tr class="memitem:a7847f74494645c2b076505c37cc4cb93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7847f74494645c2b076505c37cc4cb93">json_object_new_int64</a> (<a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> i)</td></tr> <tr class="separator:a7847f74494645c2b076505c37cc4cb93"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:aa602ee5f6182b35f3f75a927320b4efd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aa602ee5f6182b35f3f75a927320b4efd">json_object_new_uint64</a> (uint64_t i)</td></tr> +<tr class="memitem:aa602ee5f6182b35f3f75a927320b4efd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aa602ee5f6182b35f3f75a927320b4efd">json_object_new_uint64</a> (<a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> i)</td></tr> <tr class="separator:aa602ee5f6182b35f3f75a927320b4efd"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a8c56dc58a02f92cd6789ba5dcb9fe7b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8c56dc58a02f92cd6789ba5dcb9fe7b1">json_object_get_int</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> +<tr class="memitem:a8c56dc58a02f92cd6789ba5dcb9fe7b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8c56dc58a02f92cd6789ba5dcb9fe7b1">json_object_get_int</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> <tr class="separator:a8c56dc58a02f92cd6789ba5dcb9fe7b1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4ab3568f12e01fd2967e765a72456caa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a4ab3568f12e01fd2967e765a72456caa">json_object_set_int</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int new_value)</td></tr> <tr class="separator:a4ab3568f12e01fd2967e765a72456caa"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a25691322b2d1ab24a3797e5752eb659f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a25691322b2d1ab24a3797e5752eb659f">json_object_int_inc</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int64_t val)</td></tr> +<tr class="memitem:a25691322b2d1ab24a3797e5752eb659f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a25691322b2d1ab24a3797e5752eb659f">json_object_int_inc</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> val)</td></tr> <tr class="separator:a25691322b2d1ab24a3797e5752eb659f"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a1a14750b3af4df18ec8dc93b090a8e8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a1a14750b3af4df18ec8dc93b090a8e8a">json_object_get_int64</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> +<tr class="memitem:a1a14750b3af4df18ec8dc93b090a8e8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a1a14750b3af4df18ec8dc93b090a8e8a">json_object_get_int64</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> <tr class="separator:a1a14750b3af4df18ec8dc93b090a8e8a"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a82c27579b6d25d9d0eb3b72758d8b71d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a82c27579b6d25d9d0eb3b72758d8b71d">json_object_get_uint64</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> +<tr class="memitem:a82c27579b6d25d9d0eb3b72758d8b71d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a82c27579b6d25d9d0eb3b72758d8b71d">json_object_get_uint64</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> <tr class="separator:a82c27579b6d25d9d0eb3b72758d8b71d"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a7d3948600dde732abed0e261264ef53a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7d3948600dde732abed0e261264ef53a">json_object_set_int64</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int64_t new_value)</td></tr> +<tr class="memitem:a7d3948600dde732abed0e261264ef53a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7d3948600dde732abed0e261264ef53a">json_object_set_int64</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> new_value)</td></tr> <tr class="separator:a7d3948600dde732abed0e261264ef53a"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a9900aa9a425e6f14e295b298460b65d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a9900aa9a425e6f14e295b298460b65d4">json_object_set_uint64</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, uint64_t new_value)</td></tr> +<tr class="memitem:a9900aa9a425e6f14e295b298460b65d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a9900aa9a425e6f14e295b298460b65d4">json_object_set_uint64</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> new_value)</td></tr> <tr class="separator:a9900aa9a425e6f14e295b298460b65d4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a594a093bafb9091f843da3197e0638aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a594a093bafb9091f843da3197e0638aa">json_object_new_double</a> (double d)</td></tr> <tr class="separator:a594a093bafb9091f843da3197e0638aa"><td class="memSeparator" colspan="2"> </td></tr> @@ -308,6 +312,20 @@ </div> </div> +<a class="anchor" id="a195258c9acc1f8a216d7c9528b00d450"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define JSON_C_TO_STRING_COLOR   (1 << 5)</td> + </tr> + </table> +</div><div class="memdoc"> +<p>A flag for the <a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a> and <a class="el" href="json__util_8h.html#a68a7385c555cf21797e361d1d4de3441">json_object_to_file_ext()</a> functions which causes the output to be formatted.</p> +<p>Use color for printing json. </p> + +</div> +</div> <a class="anchor" id="a5c11d72c55f3ab7c088f19e7bf118163"></a> <div class="memitem"> <div class="memproto"> @@ -732,6 +750,49 @@ </div> </div> +<a class="anchor" id="ae40a00944afd41c9a463c6d9e8256f3b"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_array_insert_idx </td> + <td>(</td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> + <td class="paramname"><em>obj</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">size_t </td> + <td class="paramname"><em>idx</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> + <td class="paramname"><em>val</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> +<p>Insert an element at a specified index in an array (a json_object of type json_type_array)</p> +<p>The reference count will <em>not</em> be incremented. This is to make adding fields to objects in code more compact. If you want to retain a reference to an added object you must wrap the passed object with json_object_get</p> +<p>The array size will be automatically be expanded to the size of the index if the index is larger than the current size. If the index is within the existing array limits, then the element will be inserted and all elements will be shifted. This is the only difference between this function and <a class="el" href="json__object_8h.html#a1ac0ccdbc13a25da7d8b2dc9e421dfad">json_object_array_put_idx()</a>.</p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramname">obj</td><td>the json_object instance </td></tr> + <tr><td class="paramname">idx</td><td>the index to insert the element at </td></tr> + <tr><td class="paramname">val</td><td>the json_object to be added </td></tr> + </table> + </dd> +</dl> + +</div> +</div> <a class="anchor" id="ab9ea8f9c72d5adf83fdcbfe69f97fa44"></a> <div class="memitem"> <div class="memproto"> @@ -1139,7 +1200,7 @@ <div class="memproto"> <table class="memname"> <tr> - <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int32_t json_object_get_int </td> + <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">int32_t</a> json_object_get_int </td> <td>(</td> <td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> <td class="paramname"><em>obj</em></td><td>)</td> @@ -1165,7 +1226,7 @@ <div class="memproto"> <table class="memname"> <tr> - <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int64_t json_object_get_int64 </td> + <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> json_object_get_int64 </td> <td>(</td> <td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> <td class="paramname"><em>obj</em></td><td>)</td> @@ -1300,7 +1361,7 @@ <div class="memproto"> <table class="memname"> <tr> - <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> uint64_t json_object_get_uint64 </td> + <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> json_object_get_uint64 </td> <td>(</td> <td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> <td class="paramname"><em>obj</em></td><td>)</td> @@ -1357,7 +1418,7 @@ <tr> <td class="paramkey"></td> <td></td> - <td class="paramtype">int64_t </td> + <td class="paramtype"><a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> </td> <td class="paramname"><em>val</em> </td> </tr> <tr> @@ -1601,7 +1662,7 @@ <tr> <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_int </td> <td>(</td> - <td class="paramtype">int32_t </td> + <td class="paramtype"><a class="el" href="json__inttypes_8h.html#a37994e3b11c72957c6f454c6ec96d43d">int32_t</a> </td> <td class="paramname"><em>i</em></td><td>)</td> <td></td> </tr> @@ -1633,7 +1694,7 @@ <tr> <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_int64 </td> <td>(</td> - <td class="paramtype">int64_t </td> + <td class="paramtype"><a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> </td> <td class="paramname"><em>i</em></td><td>)</td> <td></td> </tr> @@ -1795,7 +1856,7 @@ <tr> <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_uint64 </td> <td>(</td> - <td class="paramtype">uint64_t </td> + <td class="paramtype"><a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> </td> <td class="paramname"><em>i</em></td><td>)</td> <td></td> </tr> @@ -2210,7 +2271,7 @@ <tr> <td class="paramkey"></td> <td></td>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__object__iterator_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__object__iterator_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -326,7 +326,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__patch_8h.html
Added
@@ -0,0 +1,128 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: json_patch.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">json_patch.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p>JSON Patch (RFC 6902) implementation for manipulating JSON objects. +<a href="#details">More...</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__patch__error.html">json_patch_error</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a134aaed1e732d029d34ce2d605f9ac8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__patch_8h.html#a134aaed1e732d029d34ce2d605f9ac8d">json_patch_apply</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *copy_from, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *patch, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> **base, struct <a class="el" href="structjson__patch__error.html">json_patch_error</a> *patch_error)</td></tr> +<tr class="separator:a134aaed1e732d029d34ce2d605f9ac8d"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> +<div class="textblock"><p>JSON Patch (RFC 6902) implementation for manipulating JSON objects. </p> +</div><h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a134aaed1e732d029d34ce2d605f9ac8d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_patch_apply </td> + <td>(</td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> + <td class="paramname"><em>copy_from</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> + <td class="paramname"><em>patch</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> ** </td> + <td class="paramname"><em>base</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">struct <a class="el" href="structjson__patch__error.html">json_patch_error</a> * </td> + <td class="paramname"><em>patch_error</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> +<p>Apply the JSON patch to the base object. The patch object must be formatted as per RFC 6902, i.e. a json_type_array containing patch operations. If the patch is not correctly formatted, an error will be returned.</p> +<p>The json_object at *base will be modified in place. Exactly one of *base or copy_from must be non-NULL. If *base is NULL, a new copy of copy_from will allocated and populated using <a class="el" href="json__object_8h.html#aaac16505f13bc56accfad82604d8bcdc">json_object_deep_copy()</a>. In this case <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> <em>must</em> be used to free *base even if the overall patching operation fails.</p> +<p>If anything fails during patching a negative value will be returned, and patch_error (if non-NULL) will be populated with error details.</p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramname">base</td><td>a pointer to the JSON object which to patch </td></tr> + <tr><td class="paramname">patch</td><td>the JSON object that describes the patch to be applied </td></tr> + <tr><td class="paramname">copy_from</td><td>a JSON object to copy to *base </td></tr> + <tr><td class="paramname">patch_error</td><td>optional, details about errors</td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>negative if an error (or not found), or 0 if patch completely applied </dd></dl> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__pointer_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__pointer_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -98,7 +98,6 @@ <p>Retrieves a JSON sub-object from inside another JSON object using the JSON pointer notation as defined in RFC 6901 <a href="https://tools.ietf.org/html/rfc6901">https://tools.ietf.org/html/rfc6901</a></p> <p>The returned JSON sub-object is equivalent to parsing manually the 'obj' JSON tree ; i.e. it's not a new object that is created, but rather a pointer inside the JSON tree.</p> <p>Internally, this is equivalent to doing a series of '<a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a>' and '<a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a>' along the given 'path'.</p> -<p>Note that the 'path' string supports 'printf()' type arguments, so, whatever is added after the 'res' param will be treated as an argument for 'path' Example: json_pointer_get(obj, "/foo/%d/%s", &res, 0, bar) This means, that you need to escape '' with '%' (just like in printf())</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">obj</td><td>the json_object instance/tree from where to retrieve sub-objects </td></tr> @@ -147,7 +146,8 @@ </table> </div><div class="memdoc"> <p>This is a variant of '<a class="el" href="json__pointer_8h.html#aff88937e32b0ba6ffbd07cb4b1919053">json_pointer_get()</a>' that supports printf() style arguments.</p> -<p>Example: json_pointer_getf(obj, res, "/foo/%d/%s", 0, bak) This also means that you need to escape '' with '%' (just like in printf())</p> +<p>Variable arguments go after the 'path_fmt' parameter.</p> +<p>Example: json_pointer_getf(obj, res, "/foo/%d/%s", 0, "bar") This also means that you need to escape '' with '%' (just like in printf())</p> <p>Please take into consideration all recommended 'printf()' format security aspects when using this function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> @@ -194,7 +194,6 @@ <p>Note that 'obj' is a double pointer, mostly for the "" (empty string) case, where the entire JSON object would be replaced by 'value'. In the case of the "" path, the object at '*obj' will have it's refcount decremented with '<a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a>' and the 'value' object will be assigned to it.</p> <p>For other cases (JSON sub-objects) ownership of 'value' will be transferred into '*obj' via '<a class="el" href="json__object_8h.html#a27bd808a022251059a43f1f6370441cd">json_object_object_add()</a>' & '<a class="el" href="json__object_8h.html#a1ac0ccdbc13a25da7d8b2dc9e421dfad">json_object_array_put_idx()</a>', so the only time the refcount should be decremented for 'value' is when the return value of '<a class="el" href="json__pointer_8h.html#aef0e651f63ce5ce35648503705e2586b">json_pointer_set()</a>' is negative (meaning the 'value' object did not get set into '*obj').</p> <p>That also implies that '<a class="el" href="json__pointer_8h.html#aef0e651f63ce5ce35648503705e2586b">json_pointer_set()</a>' does not do any refcount incrementing. (Just that single decrement that was mentioned above).</p> -<p>Note that the 'path' string supports 'printf()' type arguments, so, whatever is added after the 'value' param will be treated as an argument for 'path' Example: json_pointer_set(obj, "/foo/%d/%s", value, 0, bak) This means, that you need to escape '' with '%' (just like in printf())</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">obj</td><td>the json_object instance/tree to which to add a sub-object </td></tr> @@ -243,7 +242,8 @@ </table> </div><div class="memdoc"> <p>This is a variant of '<a class="el" href="json__pointer_8h.html#aef0e651f63ce5ce35648503705e2586b">json_pointer_set()</a>' that supports printf() style arguments.</p> -<p>Example: json_pointer_setf(obj, value, "/foo/%d/%s", 0, bak) This also means that you need to escape '' with '%' (just like in printf())</p> +<p>Variable arguments go after the 'path_fmt' parameter.</p> +<p>Example: json_pointer_setf(obj, value, "/foo/%d/%s", 0, "bar") This also means that you need to escape '' with '%' (just like in printf())</p> <p>Please take into consideration all recommended 'printf()' format security aspects when using this function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> @@ -260,7 +260,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__pointer__private_8h.html
Added
@@ -0,0 +1,174 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: json_pointer_private.h File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>Globals</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Data Structures</a> | +<a href="#typedef-members">Typedefs</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">json_pointer_private.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p>Do not use, json-c internal, may be changed or removed at any time. +<a href="#details">More...</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Data Structures</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__pointer__get__result.html">json_pointer_get_result</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> +Typedefs</h2></td></tr> +<tr class="memitem:abd9b2aa5dba43055f07b69a5060bede3"><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="json__pointer__private_8h.html#abd9b2aa5dba43055f07b69a5060bede3">json_pointer_array_set_cb</a> )(<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *parent, size_t idx, <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *value, void *priv)</td></tr> +<tr class="separator:abd9b2aa5dba43055f07b69a5060bede3"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a0de79c3e3e33f897ba9db340d7372b64"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__pointer__private_8h.html#a0de79c3e3e33f897ba9db340d7372b64">json_pointer_get_internal</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *path, struct <a class="el" href="structjson__pointer__get__result.html">json_pointer_get_result</a> *res)</td></tr> +<tr class="separator:a0de79c3e3e33f897ba9db340d7372b64"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a0ac7b6b8de2336f8cd463687d7c148d2"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__pointer__private_8h.html#a0ac7b6b8de2336f8cd463687d7c148d2">json_pointer_set_with_array_cb</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> **obj, const char *path, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *value, <a class="el" href="json__pointer__private_8h.html#abd9b2aa5dba43055f07b69a5060bede3">json_pointer_array_set_cb</a> array_set_cb, void *priv)</td></tr> +<tr class="separator:a0ac7b6b8de2336f8cd463687d7c148d2"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> +<div class="textblock"><p>Do not use, json-c internal, may be changed or removed at any time. </p> +</div><h2 class="groupheader">Typedef Documentation</h2> +<a class="anchor" id="abd9b2aa5dba43055f07b69a5060bede3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef int(* json_pointer_array_set_cb)(<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *parent, size_t idx, <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *value, void *priv)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a0de79c3e3e33f897ba9db340d7372b64"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int json_pointer_get_internal </td> + <td>(</td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> + <td class="paramname"><em>obj</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">struct <a class="el" href="structjson__pointer__get__result.html">json_pointer_get_result</a> * </td> + <td class="paramname"><em>res</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a0ac7b6b8de2336f8cd463687d7c148d2"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int json_pointer_set_with_array_cb </td> + <td>(</td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> ** </td> + <td class="paramname"><em>obj</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const char * </td> + <td class="paramname"><em>path</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td> + <td class="paramname"><em>value</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="json__pointer__private_8h.html#abd9b2aa5dba43055f07b69a5060bede3">json_pointer_array_set_cb</a> </td> + <td class="paramname"><em>array_set_cb</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">void * </td> + <td class="paramname"><em>priv</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__tokener_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__tokener_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -100,7 +100,9 @@   <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a033ce89ce7b8f9e591e4bea92121c4c7">json_tokener_error_parse_string</a>, <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a3588c05b1da8b909a8cbdef66b0a1a28">json_tokener_error_parse_comment</a>, <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59ab405d4a1282f3b037048d3456869a4c1">json_tokener_error_parse_utf8_string</a>, -<a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a1eeed74de65c0c12c9f9c28cf4f3ff1d">json_tokener_error_size</a> +<a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a23ecf6536cfbfb48781fd7874eef59a0">json_tokener_error_memory</a>, +<br/> +  <a class="el" href="json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a1eeed74de65c0c12c9f9c28cf4f3ff1d">json_tokener_error_size</a> <br/> }</td></tr> <tr class="separator:a0a31f0df8a532ef8be5c09ba40eacb59"><td class="memSeparator" colspan="2"> </td></tr> @@ -282,6 +284,8 @@ </td></tr> <tr><td valign="top"><em><a class="anchor" id="a0a31f0df8a532ef8be5c09ba40eacb59ab405d4a1282f3b037048d3456869a4c1"></a>json_tokener_error_parse_utf8_string</em> </td><td> </td></tr> +<tr><td valign="top"><em><a class="anchor" id="a0a31f0df8a532ef8be5c09ba40eacb59a23ecf6536cfbfb48781fd7874eef59a0"></a>json_tokener_error_memory</em> </td><td> +</td></tr> <tr><td valign="top"><em><a class="anchor" id="a0a31f0df8a532ef8be5c09ba40eacb59a1eeed74de65c0c12c9f9c28cf4f3ff1d"></a>json_tokener_error_size</em> </td><td> </td></tr> </table> @@ -678,7 +682,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__types_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__types_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -222,7 +222,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__util_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__util_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -78,9 +78,9 @@ <tr class="separator:afd492c120e359d2d75b67da96b580661"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9fe4dbb5fe32850cdc22a97454e4500b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html#a9fe4dbb5fe32850cdc22a97454e4500b">json_util_get_last_err</a> (void)</td></tr> <tr class="separator:a9fe4dbb5fe32850cdc22a97454e4500b"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a9d9a63936cdae6639b9cdd87fdd13506"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html#a9d9a63936cdae6639b9cdd87fdd13506">json_parse_int64</a> (const char *buf, int64_t *retval)</td></tr> +<tr class="memitem:a9d9a63936cdae6639b9cdd87fdd13506"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html#a9d9a63936cdae6639b9cdd87fdd13506">json_parse_int64</a> (const char *buf, <a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> *retval)</td></tr> <tr class="separator:a9d9a63936cdae6639b9cdd87fdd13506"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:a94c2340c1344d57f7aa067f2dd0407f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html#a94c2340c1344d57f7aa067f2dd0407f9">json_parse_uint64</a> (const char *buf, uint64_t *retval)</td></tr> +<tr class="memitem:a94c2340c1344d57f7aa067f2dd0407f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html#a94c2340c1344d57f7aa067f2dd0407f9">json_parse_uint64</a> (const char *buf, <a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> *retval)</td></tr> <tr class="separator:a94c2340c1344d57f7aa067f2dd0407f9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3f0f0b8f29a41b47d62e6c867707be50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html#a3f0f0b8f29a41b47d62e6c867707be50">json_parse_double</a> (const char *buf, double *retval)</td></tr> <tr class="separator:a3f0f0b8f29a41b47d62e6c867707be50"><td class="memSeparator" colspan="2"> </td></tr> @@ -389,7 +389,7 @@ <tr> <td class="paramkey"></td> <td></td> - <td class="paramtype">int64_t * </td> + <td class="paramtype"><a class="el" href="json__inttypes_8h.html#a67a9885ef4908cb72ce26d75b694386c">int64_t</a> * </td> <td class="paramname"><em>retval</em> </td> </tr> <tr> @@ -399,6 +399,7 @@ </tr> </table> </div><div class="memdoc"> +<p>A parsing helper for integer values. Returns 0 on success, with the parsed value assigned to *retval. Overflow/underflow are NOT considered errors, but errno will be set to ERANGE, just like the strtol/strtoll functions do. </p> </div> </div> @@ -415,7 +416,7 @@ <tr> <td class="paramkey"></td> <td></td> - <td class="paramtype">uint64_t * </td> + <td class="paramtype"><a class="el" href="json__inttypes_8h.html#aec6fcb673ff035718c238c8c9d544c47">uint64_t</a> * </td> <td class="paramname"><em>retval</em> </td> </tr> <tr> @@ -425,6 +426,7 @@ </tr> </table> </div><div class="memdoc"> +<p>A parsing help for integer values, providing one extra bit of magnitude beyond <a class="el" href="json__util_8h.html#a9d9a63936cdae6639b9cdd87fdd13506">json_parse_int64()</a>. </p> </div> </div> @@ -465,7 +467,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/json__visit_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/json__visit_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -231,7 +231,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/linkhash_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/linkhash_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -1147,7 +1147,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/md_README.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/md_README.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -43,7 +43,7 @@ <div class="textblock"></div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/md_issues_closed_for_0.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/md_issues_closed_for_0.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -682,12 +682,98 @@ <li><a href="https://github.com/json-c/json-c/issues/761">Issue #761</a> - Last commit merged to master breaks compilation</li> <li><a href="https://github.com/json-c/json-c/issues/762">Issue #762</a> - how to merge two jsons by json-c</li> <li><a href="https://github.com/json-c/json-c/issues/763">Issue #763</a> - Question: sort_fn arguments</li> -<li><a href="https://github.com/json-c/json-c/issues/764">Issue #764</a> - Make test fail on test case test_util_file </li> +<li><a href="https://github.com/json-c/json-c/issues/764">Issue #764</a> - Make test fail on test case test_util_file</li> +</ul> +<p>This list was created with: </p> +<pre class="fragment">PREV=2022-04-13 +NOW=2023-08-12 +curl "https://api.github.com/search/issues?q=repo%3Ajson-c%2Fjson-c+closed%3A>${PREV}+created%3A<${NOW}&sort=created&order=asc&per_page=100&page=1" > issues1.out +jq -r '.items | "" + .title + "(" + .url + ")" | tostring' issues?.out > issues.md +sed -e's,^\ *\(.*\)\(https://api.github.com/.*/\(0-9.*\)),* Issue #\2(https://github.com/json-c/json-c/issues/\2) - \1,' -i issues.md +cat issues.md >> issues_closed_for_0.17.md +</pre><ul> +<li><a href="https://github.com/json-c/json-c/issues/191">Issue #191</a> - Override int64 to only display uint64 strings</li> +<li><a href="https://github.com/json-c/json-c/issues/537">Issue #537</a> - Replace '\0' only when parsing key, not change data in value.</li> +<li><a href="https://github.com/json-c/json-c/issues/570">Issue #570</a> - Figure out what needs to be done with Android.configure.mk</li> +<li><a href="https://github.com/json-c/json-c/issues/587">Issue #587</a> - Store the hashValue to avoid repeating the hash calculation during the hash resize.</li> +<li><a href="https://github.com/json-c/json-c/issues/612">Issue #612</a> - json-c-0.11: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...</li> +<li><a href="https://github.com/json-c/json-c/issues/620">Issue #620</a> - Introduce json_object_new_string_{ext,noalloc}().</li> +<li><a href="https://github.com/json-c/json-c/issues/624">Issue #624</a> - json-c-0.14: Detect broken RDRAND during initialization.</li> +<li><a href="https://github.com/json-c/json-c/issues/625">Issue #625</a> - json-c-0.13.x: Detect broken RDRAND during initialization.</li> +<li><a href="https://github.com/json-c/json-c/issues/668">Issue #668</a> - Memory usage regression due to newlocal() on older FreeBSD releases</li> +<li><a href="https://github.com/json-c/json-c/issues/676">Issue #676</a> - dereferencing type-punned pointer might break strict-aliasing rules -Werror=strict-aliasing</li> +<li><a href="https://github.com/json-c/json-c/issues/677">Issue #677</a> - Naming conflict when using both json-c and jansson</li> +<li><a href="https://github.com/json-c/json-c/issues/679">Issue #679</a> - Let json-c be used with obsolete compilers</li> +<li><a href="https://github.com/json-c/json-c/issues/681">Issue #681</a> - json_tokener_parse_ex: <code>null</code> (4 bytes) only parses as valid JSON when passed with null terminator (5 bytes). Documentation issue?</li> +<li><a href="https://github.com/json-c/json-c/issues/686">Issue #686</a> - Remove dependency on libM::getrandom</li> +<li><a href="https://github.com/json-c/json-c/issues/687">Issue #687</a> - Does not build on Apple Silicon M1</li> +<li><a href="https://github.com/json-c/json-c/issues/688">Issue #688</a> - json-c-0.15-nodoc.tar.gz build fails</li> +<li><a href="https://github.com/json-c/json-c/issues/702">Issue #702</a> - json_patch: add first implementation only with patch application</li> +<li><a href="https://github.com/json-c/json-c/issues/704">Issue #704</a> - add <a class="el" href="json__object_8h.html#ae40a00944afd41c9a463c6d9e8256f3b">json_object_array_insert_idx()</a> + test-cases + fix json_pointer doc-strings</li> +<li><a href="https://github.com/json-c/json-c/issues/705">Issue #705</a> - segmentation fault on json-c parsing methods in cross compiled target</li> +<li><a href="https://github.com/json-c/json-c/issues/721">Issue #721</a> - cmake test fails with building json-c with icc</li> +<li><a href="https://github.com/json-c/json-c/issues/730">Issue #730</a> - Need a comparison with other JSON libraries in C</li> +<li><a href="https://github.com/json-c/json-c/issues/733">Issue #733</a> - Official release? 1.0?</li> +<li><a href="https://github.com/json-c/json-c/issues/756">Issue #756</a> - Question: Is there any way to build this with Gnu Make?</li> +<li><a href="https://github.com/json-c/json-c/issues/757">Issue #757</a> - json_object_from_fd_ex: fail if file is too large</li> +<li><a href="https://github.com/json-c/json-c/issues/759">Issue #759</a> - json_tokener_parse_ex: handle out of memory errors</li> +<li><a href="https://github.com/json-c/json-c/issues/766">Issue #766</a> - Some people have trouble with undefined references to arc4random</li> +<li><a href="https://github.com/json-c/json-c/issues/767">Issue #767</a> - How to create a character array using json-c</li> +<li><a href="https://github.com/json-c/json-c/issues/768">Issue #768</a> - commits from May 30, 2022 killed my docker build process</li> +<li><a href="https://github.com/json-c/json-c/issues/769">Issue #769</a> - Issue #768</li> +<li><a href="https://github.com/json-c/json-c/issues/770">Issue #770</a> - json_parse.c:170:13: error: this statement may fall through</li> +<li><a href="https://github.com/json-c/json-c/issues/771">Issue #771</a> - fix fallthough warning</li> +<li><a href="https://github.com/json-c/json-c/issues/772">Issue #772</a> - add JSON_C_TO_STRING_COLOR option</li> +<li><a href="https://github.com/json-c/json-c/issues/773">Issue #773</a> - problem with u_int64_t</li> +<li><a href="https://github.com/json-c/json-c/issues/774">Issue #774</a> - The function add_compile_options was added to CMake version 2.8.12 and later but your minimum is 2.8 which will not work</li> +<li><a href="https://github.com/json-c/json-c/issues/775">Issue #775</a> - list(TRANSFORM ...) is not available prior to CMake 3.12.</li> +<li><a href="https://github.com/json-c/json-c/issues/776">Issue #776</a> - Fix typo</li> +<li><a href="https://github.com/json-c/json-c/issues/777">Issue #777</a> - Don't try to change locale when libc only supports the C locale</li> +<li><a href="https://github.com/json-c/json-c/issues/778">Issue #778</a> - Do not insert newlines when converting empty arrays to json string and JSON_C_TO_STRING_PRETTY is used</li> +<li><a href="https://github.com/json-c/json-c/issues/779">Issue #779</a> - Fix compiling for Android</li> +<li><a href="https://github.com/json-c/json-c/issues/780">Issue #780</a> - Memory Leak when setting empty strings when c_string.pdata is used</li> +<li><a href="https://github.com/json-c/json-c/issues/781">Issue #781</a> - Fix memory leak with emtpy strings in json_object_set_string</li> +<li><a href="https://github.com/json-c/json-c/issues/782">Issue #782</a> - Fix typos found by codespell</li> +<li><a href="https://github.com/json-c/json-c/issues/783">Issue #783</a> - Fix build with clang-15+</li> +<li><a href="https://github.com/json-c/json-c/issues/784">Issue #784</a> - get_time_seed(): silence warning emitted by Coverity Scan static analyzer</li> +<li><a href="https://github.com/json-c/json-c/issues/786">Issue #786</a> - ghpages update was not published for json-c-0.16</li> +<li><a href="https://github.com/json-c/json-c/issues/787">Issue #787</a> - -static linker flag result in building failed</li> +<li><a href="https://github.com/json-c/json-c/issues/788">Issue #788</a> - Clear sensitive information.</li> +<li><a href="https://github.com/json-c/json-c/issues/789">Issue #789</a> - Unnecessary struct declaration and unsafe function usage</li> +<li><a href="https://github.com/json-c/json-c/issues/790">Issue #790</a> - Small update to README file</li> +<li><a href="https://github.com/json-c/json-c/issues/791">Issue #791</a> - json_object_object_foreach not ISO-C compliant</li> +<li><a href="https://github.com/json-c/json-c/issues/792">Issue #792</a> - <code>json_object_get_int</code> does not set <code>EINVAL</code> on invalid string</li> +<li><a href="https://github.com/json-c/json-c/issues/794">Issue #794</a> - replaced</li> +<li><a href="https://github.com/json-c/json-c/issues/796">Issue #796</a> - Added Test for get int functions</li> +<li><a href="https://github.com/json-c/json-c/issues/797">Issue #797</a> - make uninstall</li> +<li><a href="https://github.com/json-c/json-c/issues/798">Issue #798</a> - API to deal with enums is missing</li> +<li><a href="https://github.com/json-c/json-c/issues/799">Issue #799</a> - json_object_put: Assertion `jso->_ref_count > 0' failed.</li> +<li><a href="https://github.com/json-c/json-c/issues/800">Issue #800</a> - String converted to scientific notation</li> +<li><a href="https://github.com/json-c/json-c/issues/801">Issue #801</a> - #error You do not have strncasecmp on your system.</li> +<li><a href="https://github.com/json-c/json-c/issues/802">Issue #802</a> - Problem: modern CMake warns about version 2.8</li> +<li><a href="https://github.com/json-c/json-c/issues/803">Issue #803</a> - Problem: confusing error message in snprintf_compat.h</li> +<li><a href="https://github.com/json-c/json-c/issues/804">Issue #804</a> - Problem: cmake 3.25.1 warns about CMP0042 not being set</li> +<li><a href="https://github.com/json-c/json-c/issues/806">Issue #806</a> - The problem is libjson-c.dylib incompatible with OS version</li> +<li><a href="https://github.com/json-c/json-c/issues/807">Issue #807</a> - json simple parse syntax</li> +<li><a href="https://github.com/json-c/json-c/issues/808">Issue #808</a> - iOS Build using cmake fails due to 64 to 32bits conversion precision loss</li> +<li><a href="https://github.com/json-c/json-c/issues/809">Issue #809</a> - Feature request json_object_new_uint()</li> +<li><a href="https://github.com/json-c/json-c/issues/810">Issue #810</a> - docs: update to Internet Standard reference</li> +<li><a href="https://github.com/json-c/json-c/issues/811">Issue #811</a> - dependence on execution character set</li> +<li><a href="https://github.com/json-c/json-c/issues/812">Issue #812</a> - Duplicate symbol when compiling with clang-cl</li> +<li><a href="https://github.com/json-c/json-c/issues/813">Issue #813</a> - Build apps only in project itself.</li> +<li><a href="https://github.com/json-c/json-c/issues/814">Issue #814</a> - Code execution order</li> +<li><a href="https://github.com/json-c/json-c/issues/816">Issue #816</a> - Hi I need to generate libjson-c.so.3 and libjson-c.so.3.0.1, please help with steps</li> +<li><a href="https://github.com/json-c/json-c/issues/818">Issue #818</a> - error: a function declaration without a prototype is deprecated in all versions of C</li> +<li><a href="https://github.com/json-c/json-c/issues/819">Issue #819</a> - build with intel 2023 fails on vasprintf</li> +<li><a href="https://github.com/json-c/json-c/issues/820">Issue #820</a> - ISO C forbids in</li> +<li><a href="https://github.com/json-c/json-c/issues/821">Issue #821</a> - Any release planing for 0.17?</li> +<li><a href="https://github.com/json-c/json-c/issues/822">Issue #822</a> - Added option to disable app build</li> +<li><a href="https://github.com/json-c/json-c/issues/823">Issue #823</a> - Symbol not found during linking stage of libjson-c.so </li> </ul> </div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/pages.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/pages.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -50,7 +50,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/printbuf_8h.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/printbuf_8h.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -376,7 +376,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structarray__list.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structarray__list.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -115,7 +115,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structjson__object__iter.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structjson__object__iter.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -103,7 +103,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structjson__object__iterator.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structjson__object__iterator.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -75,7 +75,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structjson__patch__error.html
Added
@@ -0,0 +1,120 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: json_patch_error Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">json_patch_error Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:a80d2ee1f1d8ee4c1923e4c5a81950ac3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__patch__error.html#a80d2ee1f1d8ee4c1923e4c5a81950ac3">errno_code</a></td></tr> +<tr class="separator:a80d2ee1f1d8ee4c1923e4c5a81950ac3"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a25a3684349fc0a52585511eb734ecb7a"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__patch__error.html#a25a3684349fc0a52585511eb734ecb7a">patch_failure_idx</a></td></tr> +<tr class="separator:a25a3684349fc0a52585511eb734ecb7a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a6c7bdff0bc64ac7eb84224c3c6be3361"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__patch__error.html#a6c7bdff0bc64ac7eb84224c3c6be3361">errmsg</a></td></tr> +<tr class="separator:a6c7bdff0bc64ac7eb84224c3c6be3361"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> +<div class="textblock"><p>Details of an error that occurred during <a class="el" href="json__patch_8h.html#a134aaed1e732d029d34ce2d605f9ac8d">json_patch_apply()</a> </p> +</div><h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="a6c7bdff0bc64ac7eb84224c3c6be3361"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* json_patch_error::errmsg</td> + </tr> + </table> +</div><div class="memdoc"> +<p>A human readable error message. Allocated from static storage, does not need to be freed. </p> + +</div> +</div> +<a class="anchor" id="a80d2ee1f1d8ee4c1923e4c5a81950ac3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int json_patch_error::errno_code</td> + </tr> + </table> +</div><div class="memdoc"> +<p>An errno value indicating what kind of error occurred. Possible values include:</p> +<ul> +<li>ENOENT - A path referenced in the operation does not exist.</li> +<li>EINVAL - An invalid operation or with invalid path was attempted</li> +<li>ENOMEM - Unable to allocate memory</li> +<li>EFAULT - Invalid arguments were passed to <a class="el" href="json__patch_8h.html#a134aaed1e732d029d34ce2d605f9ac8d">json_patch_apply()</a> (i.e. a C API error, vs. a data error like EINVAL) </li> +</ul> + +</div> +</div> +<a class="anchor" id="a25a3684349fc0a52585511eb734ecb7a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t json_patch_error::patch_failure_idx</td> + </tr> + </table> +</div><div class="memdoc"> +<p>The index into the patch array of the operation that failed, or SIZE_T_MAX for overall errors. </p> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li><a class="el" href="json__patch_8h.html">json_patch.h</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structjson__pointer__get__result.html
Added
@@ -0,0 +1,123 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>json-c: json_pointer_get_result Struct Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">json-c +  <span id="projectnumber">0.17</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.2 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="annotated.html"><span>Data Structures</span></a></li> + <li><a href="functions.html"><span>Data Fields</span></a></li> + </ul> + </div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#pub-attribs">Data Fields</a> </div> + <div class="headertitle"> +<div class="title">json_pointer_get_result Struct Reference</div> </div> +</div><!--header--> +<div class="contents"> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> +Data Fields</h2></td></tr> +<tr class="memitem:adba314387ced3bef96877d8cf756b087"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__pointer__get__result.html#adba314387ced3bef96877d8cf756b087">parent</a></td></tr> +<tr class="separator:adba314387ced3bef96877d8cf756b087"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a9919695cf5fd827e14b843d22b222d8b"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__pointer__get__result.html#a9919695cf5fd827e14b843d22b222d8b">obj</a></td></tr> +<tr class="separator:a9919695cf5fd827e14b843d22b222d8b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a09096a029acda753531551ea2548db6a"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__pointer__get__result.html#a09096a029acda753531551ea2548db6a">key_in_parent</a></td></tr> +<tr class="separator:a09096a029acda753531551ea2548db6a"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab4018de1d0573e9db323ba0627da6ab1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="json__inttypes_8h.html#a6eb1e68cc391dd753bc8ce896dbb8315">uint32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__pointer__get__result.html#ab4018de1d0573e9db323ba0627da6ab1">index_in_parent</a></td></tr> +<tr class="separator:ab4018de1d0573e9db323ba0627da6ab1"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Field Documentation</h2> +<a class="anchor" id="ab4018de1d0573e9db323ba0627da6ab1"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="json__inttypes_8h.html#a6eb1e68cc391dd753bc8ce896dbb8315">uint32_t</a> json_pointer_get_result::index_in_parent</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a09096a029acda753531551ea2548db6a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const char* json_pointer_get_result::key_in_parent</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9919695cf5fd827e14b843d22b222d8b"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_pointer_get_result::obj</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="adba314387ced3bef96877d8cf756b087"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_pointer_get_result::parent</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<hr/>The documentation for this struct was generated from the following file:<ul> +<li><a class="el" href="json__pointer__private_8h.html">json_pointer_private.h</a></li> +</ul> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.2 +</small></address> +</body> +</html>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structjson__tokener.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structjson__tokener.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -246,7 +246,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structjson__tokener__srec.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structjson__tokener__srec.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -117,7 +117,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structlh__entry.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structlh__entry.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -151,7 +151,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structlh__table.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structlh__table.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -191,7 +191,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/doc/html/structprintbuf.html -> _service:tar_scm:json-c-0.17-20230812.tar.gz/doc/html/structprintbuf.html
Changed
@@ -17,7 +17,7 @@ <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">json-c -  <span id="projectnumber">0.16</span> +  <span id="projectnumber">0.17</span> </div> </td> </tr> @@ -101,7 +101,7 @@ </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> -Generated on Thu Apr 14 2022 01:11:24 for json-c by  <a href="http://www.doxygen.org/index.html"> +Generated on Sat Aug 12 2023 18:59:55 for json-c by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.2 </small></address>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/issues_closed_for_0.17.md
Added
@@ -0,0 +1,88 @@ +This list was created with: + +``` +PREV=2022-04-13 +NOW=2023-08-12 +curl "https://api.github.com/search/issues?q=repo%3Ajson-c%2Fjson-c+closed%3A>${PREV}+created%3A<${NOW}&sort=created&order=asc&per_page=100&page=1" > issues1.out +jq -r '.items | "" + .title + "(" + .url + ")" | tostring' issues?.out > issues.md +sed -e's,^\ *\(.*\)\(https://api.github.com/.*/\(0-9.*\)),* Issue #\2(https://github.com/json-c/json-c/issues/\2) - \1,' -i issues.md +cat issues.md >> issues_closed_for_0.17.md +``` + +* Issue #191(https://github.com/json-c/json-c/issues/191) - Override int64 to only display uint64 strings +* Issue #537(https://github.com/json-c/json-c/issues/537) - Replace '\0' only when parsing key, not change data in value. +* Issue #570(https://github.com/json-c/json-c/issues/570) - Figure out what needs to be done with Android.configure.mk +* Issue #587(https://github.com/json-c/json-c/issues/587) - Store the hashValue to avoid repeating the hash calculation during the hash resize. +* Issue #612(https://github.com/json-c/json-c/issues/612) - json-c-0.11: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ... +* Issue #620(https://github.com/json-c/json-c/issues/620) - Introduce json_object_new_string_{ext,noalloc}(). +* Issue #624(https://github.com/json-c/json-c/issues/624) - json-c-0.14: Detect broken RDRAND during initialization. +* Issue #625(https://github.com/json-c/json-c/issues/625) - json-c-0.13.x: Detect broken RDRAND during initialization. +* Issue #668(https://github.com/json-c/json-c/issues/668) - Memory usage regression due to newlocal() on older FreeBSD releases +* Issue #676(https://github.com/json-c/json-c/issues/676) - dereferencing type-punned pointer might break strict-aliasing rules -Werror=strict-aliasing +* Issue #677(https://github.com/json-c/json-c/issues/677) - Naming conflict when using both json-c and jansson +* Issue #679(https://github.com/json-c/json-c/issues/679) - Let json-c be used with obsolete compilers +* Issue #681(https://github.com/json-c/json-c/issues/681) - json_tokener_parse_ex: `null` (4 bytes) only parses as valid JSON when passed with null terminator (5 bytes). Documentation issue? +* Issue #686(https://github.com/json-c/json-c/issues/686) - Remove dependency on libM::getrandom +* Issue #687(https://github.com/json-c/json-c/issues/687) - Does not build on Apple Silicon M1 +* Issue #688(https://github.com/json-c/json-c/issues/688) - json-c-0.15-nodoc.tar.gz build fails +* Issue #702(https://github.com/json-c/json-c/issues/702) - json_patch: add first implementation only with patch application +* Issue #704(https://github.com/json-c/json-c/issues/704) - add json_object_array_insert_idx() + test-cases + fix json_pointer doc-strings +* Issue #705(https://github.com/json-c/json-c/issues/705) - segmentation fault on json-c parsing methods in cross compiled target +* Issue #721(https://github.com/json-c/json-c/issues/721) - cmake test fails with building json-c with icc +* Issue #730(https://github.com/json-c/json-c/issues/730) - Need a comparison with other JSON libraries in C +* Issue #733(https://github.com/json-c/json-c/issues/733) - Official release? 1.0? +* Issue #756(https://github.com/json-c/json-c/issues/756) - Question: Is there any way to build this with Gnu Make? +* Issue #757(https://github.com/json-c/json-c/issues/757) - json_object_from_fd_ex: fail if file is too large +* Issue #759(https://github.com/json-c/json-c/issues/759) - json_tokener_parse_ex: handle out of memory errors +* Issue #766(https://github.com/json-c/json-c/issues/766) - Some people have trouble with undefined references to arc4random +* Issue #767(https://github.com/json-c/json-c/issues/767) - How to create a character array using json-c +* Issue #768(https://github.com/json-c/json-c/issues/768) - commits from May 30, 2022 killed my docker build process +* Issue #769(https://github.com/json-c/json-c/issues/769) - Issue #768 +* Issue #770(https://github.com/json-c/json-c/issues/770) - json_parse.c:170:13: error: this statement may fall through +* Issue #771(https://github.com/json-c/json-c/issues/771) - fix fallthough warning +* Issue #772(https://github.com/json-c/json-c/issues/772) - add JSON_C_TO_STRING_COLOR option +* Issue #773(https://github.com/json-c/json-c/issues/773) - problem with u_int64_t +* Issue #774(https://github.com/json-c/json-c/issues/774) - The function add_compile_options was added to CMake version 2.8.12 and later but your minimum is 2.8 which will not work +* Issue #775(https://github.com/json-c/json-c/issues/775) - list(TRANSFORM ...) is not available prior to CMake 3.12. +* Issue #776(https://github.com/json-c/json-c/issues/776) - Fix typo +* Issue #777(https://github.com/json-c/json-c/issues/777) - Don't try to change locale when libc only supports the C locale +* Issue #778(https://github.com/json-c/json-c/issues/778) - Do not insert newlines when converting empty arrays to json string and JSON_C_TO_STRING_PRETTY is used +* Issue #779(https://github.com/json-c/json-c/issues/779) - Fix compiling for Android +* Issue #780(https://github.com/json-c/json-c/issues/780) - Memory Leak when setting empty strings when c_string.pdata is used +* Issue #781(https://github.com/json-c/json-c/issues/781) - Fix memory leak with emtpy strings in json_object_set_string +* Issue #782(https://github.com/json-c/json-c/issues/782) - Fix typos found by codespell +* Issue #783(https://github.com/json-c/json-c/issues/783) - Fix build with clang-15+ +* Issue #784(https://github.com/json-c/json-c/issues/784) - get_time_seed(): silence warning emitted by Coverity Scan static analyzer +* Issue #786(https://github.com/json-c/json-c/issues/786) - ghpages update was not published for json-c-0.16 +* Issue #787(https://github.com/json-c/json-c/issues/787) - -static linker flag result in building failed +* Issue #788(https://github.com/json-c/json-c/issues/788) - Clear sensitive information. +* Issue #789(https://github.com/json-c/json-c/issues/789) - Unnecessary struct declaration and unsafe function usage +* Issue #790(https://github.com/json-c/json-c/issues/790) - Small update to README file +* Issue #791(https://github.com/json-c/json-c/issues/791) - json_object_object_foreach not ISO-C compliant +* Issue #792(https://github.com/json-c/json-c/issues/792) - ` json_object_get_int` does not set `EINVAL` on invalid string +* Issue #794(https://github.com/json-c/json-c/issues/794) - replaced +* Issue #796(https://github.com/json-c/json-c/issues/796) - Added Test for get int functions +* Issue #797(https://github.com/json-c/json-c/issues/797) - make uninstall +* Issue #798(https://github.com/json-c/json-c/issues/798) - API to deal with enums is missing +* Issue #799(https://github.com/json-c/json-c/issues/799) - json_object_put: Assertion `jso->_ref_count > 0' failed. +* Issue #800(https://github.com/json-c/json-c/issues/800) - String converted to scientific notation +* Issue #801(https://github.com/json-c/json-c/issues/801) - #error You do not have strncasecmp on your system. +* Issue #802(https://github.com/json-c/json-c/issues/802) - Problem: modern CMake warns about version 2.8 +* Issue #803(https://github.com/json-c/json-c/issues/803) - Problem: confusing error message in snprintf_compat.h +* Issue #804(https://github.com/json-c/json-c/issues/804) - Problem: cmake 3.25.1 warns about CMP0042 not being set +* Issue #806(https://github.com/json-c/json-c/issues/806) - The problem is libjson-c.dylib incompatible with OS version +* Issue #807(https://github.com/json-c/json-c/issues/807) - json simple parse syntax +* Issue #808(https://github.com/json-c/json-c/issues/808) - iOS Build using cmake fails due to 64 to 32bits conversion precision loss +* Issue #809(https://github.com/json-c/json-c/issues/809) - Feature request json_object_new_uint() +* Issue #810(https://github.com/json-c/json-c/issues/810) - docs: update to Internet Standard reference +* Issue #811(https://github.com/json-c/json-c/issues/811) - dependence on execution character set +* Issue #812(https://github.com/json-c/json-c/issues/812) - Duplicate symbol when compiling with clang-cl +* Issue #813(https://github.com/json-c/json-c/issues/813) - Build apps only in project itself. +* Issue #814(https://github.com/json-c/json-c/issues/814) - Code execution order +* Issue #816(https://github.com/json-c/json-c/issues/816) - Hi I need to generate libjson-c.so.3 and libjson-c.so.3.0.1, please help with steps +* Issue #818(https://github.com/json-c/json-c/issues/818) - error: a function declaration without a prototype is deprecated in all versions of C +* Issue #819(https://github.com/json-c/json-c/issues/819) - build with intel 2023 fails on vasprintf +* Issue #820(https://github.com/json-c/json-c/issues/820) - ISO C forbids in +* Issue #821(https://github.com/json-c/json-c/issues/821) - Any release planing for 0.17? +* Issue #822(https://github.com/json-c/json-c/issues/822) - Added option to disable app build +* Issue #823(https://github.com/json-c/json-c/issues/823) - Symbol not found during linking stage of libjson-c.so
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json-c.sym -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json-c.sym
Changed
@@ -41,6 +41,8 @@ printbuf_new; printbuf_reset; sprintbuf; + # Used by tests: + _json_c_strerror; }; JSONC_0.14 { @@ -165,6 +167,12 @@ } JSONC_0.14; JSONC_0.16 { -# global: -# ...new symbols here... +# No new symbols in 0.16 } JSONC_0.15; + +JSONC_0.17 { + global: + json_object_array_insert_idx; + json_patch_apply; +# array_list_insert_idx is intentionally not exported +} JSONC_0.16;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json.h.cmakein -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json.h.cmakein
Changed
@@ -26,6 +26,7 @@ #include "json_c_version.h" #include "json_object.h" #include "json_object_iterator.h" +@JSON_H_JSON_PATCH@ @JSON_H_JSON_POINTER@ #include "json_tokener.h" #include "json_util.h"
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_c_version.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_c_version.h
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2012,2017-2022 Eric Haszlakiewicz + * Copyright (c) 2012,2017 Eric Haszlakiewicz * * This library is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See COPYING for details. @@ -17,11 +17,11 @@ #endif #define JSON_C_MAJOR_VERSION 0 -#define JSON_C_MINOR_VERSION 16 +#define JSON_C_MINOR_VERSION 17 #define JSON_C_MICRO_VERSION 0 #define JSON_C_VERSION_NUM \ ((JSON_C_MAJOR_VERSION << 16) | (JSON_C_MINOR_VERSION << 8) | JSON_C_MICRO_VERSION) -#define JSON_C_VERSION "0.16" +#define JSON_C_VERSION "0.17" #ifndef JSON_EXPORT #if defined(_MSC_VER) && defined(JSON_C_DLL)
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_inttypes.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_inttypes.h
Changed
@@ -13,7 +13,15 @@ #include <inttypes.h> #else +#ifdef JSON_C_HAVE_STDINT_H #include <stdint.h> +#else +/* Really only valid for old MS compilers, VS2008 and earlier: */ +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#endif #define PRId64 "I64d" #define SCNd64 "I64d" @@ -21,4 +29,9 @@ #endif +#if defined(_MSC_VER) +#include <BaseTsd.h> +typedef SSIZE_T ssize_t; +#endif + #endif
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_object.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_object.c
Changed
@@ -53,6 +53,7 @@ #endif #endif +const char *json_number_chars = "0123456789.+-eE"; /* Unused, but part of public API, drop for 1.0 */ const char *json_hex_chars = "0123456789abcdefABCDEF"; static void json_object_generic_delete(struct json_object *jso); @@ -64,6 +65,12 @@ #define inline #endif +/* define colors */ +#define ANSI_COLOR_RESET "\0330m" +#define ANSI_COLOR_FG_GREEN "\0330;32m" +#define ANSI_COLOR_FG_BLUE "\0330;34m" +#define ANSI_COLOR_FG_MAGENTA "\0330;35m" + /* * Helper functions to more safely cast to a particular type of json_object */ @@ -460,35 +467,45 @@ struct json_object_iter iter; printbuf_strappend(pb, "{" /*}*/); - if (flags & JSON_C_TO_STRING_PRETTY) - printbuf_strappend(pb, "\n"); json_object_object_foreachC(jso, iter) { if (had_children) { printbuf_strappend(pb, ","); - if (flags & JSON_C_TO_STRING_PRETTY) - printbuf_strappend(pb, "\n"); } + if (flags & JSON_C_TO_STRING_PRETTY) + printbuf_strappend(pb, "\n"); had_children = 1; if (flags & JSON_C_TO_STRING_SPACED && !(flags & JSON_C_TO_STRING_PRETTY)) printbuf_strappend(pb, " "); indent(pb, level + 1, flags); + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_FG_BLUE); + printbuf_strappend(pb, "\""); json_escape_str(pb, iter.key, strlen(iter.key), flags); + printbuf_strappend(pb, "\""); + + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_RESET); + if (flags & JSON_C_TO_STRING_SPACED) - printbuf_strappend(pb, "\": "); + printbuf_strappend(pb, ": "); else - printbuf_strappend(pb, "\":"); - if (iter.val == NULL) + printbuf_strappend(pb, ":"); + + if (iter.val == NULL) { + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_FG_MAGENTA); printbuf_strappend(pb, "null"); - else if (iter.val->_to_json_string(iter.val, pb, level + 1, flags) < 0) + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_RESET); + } else if (iter.val->_to_json_string(iter.val, pb, level + 1, flags) < 0) return -1; } - if (flags & JSON_C_TO_STRING_PRETTY) + if ((flags & JSON_C_TO_STRING_PRETTY) && had_children) { - if (had_children) - printbuf_strappend(pb, "\n"); + printbuf_strappend(pb, "\n"); indent(pb, level, flags); } if (flags & JSON_C_TO_STRING_SPACED && !(flags & JSON_C_TO_STRING_PRETTY)) @@ -629,9 +646,18 @@ static int json_object_boolean_to_json_string(struct json_object *jso, struct printbuf *pb, int level, int flags) { + int ret; + + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_FG_MAGENTA); + if (JC_BOOL(jso)->c_boolean) - return printbuf_strappend(pb, "true"); - return printbuf_strappend(pb, "false"); + ret = printbuf_strappend(pb, "true"); + else + ret = printbuf_strappend(pb, "false"); + if (ret > -1 && flags & JSON_C_TO_STRING_COLOR) + return printbuf_strappend(pb, ANSI_COLOR_RESET); + return ret; } struct json_object *json_object_new_boolean(json_bool b) @@ -1220,9 +1246,13 @@ int level, int flags) { ssize_t len = JC_STRING(jso)->len; + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_FG_GREEN); printbuf_strappend(pb, "\""); json_escape_str(pb, get_string_component(jso), len < 0 ? -(ssize_t)len : len, flags); printbuf_strappend(pb, "\""); + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_RESET); return 0; } @@ -1323,11 +1353,18 @@ // length as int, cap length at INT_MAX. return 0; - dstbuf = get_string_component_mutable(jso); curlen = JC_STRING(jso)->len; - if (curlen < 0) - curlen = -curlen; + if (curlen < 0) { + if (len == 0) { + free(JC_STRING(jso)->c_string.pdata); + JC_STRING(jso)->len = curlen = 0; + } else { + curlen = -curlen; + } + } + newlen = len; + dstbuf = get_string_component_mutable(jso); if ((ssize_t)len > curlen) { @@ -1374,31 +1411,34 @@ size_t ii; printbuf_strappend(pb, ""); - if (flags & JSON_C_TO_STRING_PRETTY) - printbuf_strappend(pb, "\n"); for (ii = 0; ii < json_object_array_length(jso); ii++) { struct json_object *val; if (had_children) { printbuf_strappend(pb, ","); - if (flags & JSON_C_TO_STRING_PRETTY) - printbuf_strappend(pb, "\n"); } + if (flags & JSON_C_TO_STRING_PRETTY) + printbuf_strappend(pb, "\n"); had_children = 1; if (flags & JSON_C_TO_STRING_SPACED && !(flags & JSON_C_TO_STRING_PRETTY)) printbuf_strappend(pb, " "); indent(pb, level + 1, flags); val = json_object_array_get_idx(jso, ii); - if (val == NULL) + if (val == NULL) { + + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_FG_MAGENTA); printbuf_strappend(pb, "null"); - else if (val->_to_json_string(val, pb, level + 1, flags) < 0) + if (flags & JSON_C_TO_STRING_COLOR) + printbuf_strappend(pb, ANSI_COLOR_RESET); + + } else if (val->_to_json_string(val, pb, level + 1, flags) < 0) return -1; } - if (flags & JSON_C_TO_STRING_PRETTY) + if ((flags & JSON_C_TO_STRING_PRETTY) && had_children) { - if (had_children) - printbuf_strappend(pb, "\n"); + printbuf_strappend(pb, "\n"); indent(pb, level, flags); } @@ -1480,6 +1520,12 @@ return array_list_add(JC_ARRAY(jso)->c_array, val); } +int json_object_array_insert_idx(struct json_object *jso, size_t idx, struct json_object *val) +{ + assert(json_object_get_type(jso) == json_type_array); + return array_list_insert_idx(JC_ARRAY(jso)->c_array, idx, val); +} + int json_object_array_put_idx(struct json_object *jso, size_t idx, struct json_object *val) { assert(json_object_get_type(jso) == json_type_array);
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_object.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_object.h
Changed
@@ -75,6 +75,15 @@ #define JSON_C_TO_STRING_NOSLASHESCAPE (1 << 4) /** + * A flag for the json_object_to_json_string_ext() and + * json_object_to_file_ext() functions which causes + * the output to be formatted. + * + * Use color for printing json. + */ +#define JSON_C_TO_STRING_COLOR (1 << 5) + +/** * A flag for the json_object_object_add_ex function which * causes the value to be added without a check if it already exists. * Note: it is the responsibility of the caller to ensure that no @@ -613,6 +622,25 @@ JSON_EXPORT int json_object_array_put_idx(struct json_object *obj, size_t idx, struct json_object *val); +/** Insert an element at a specified index in an array (a json_object of type json_type_array) + * + * The reference count will *not* be incremented. This is to make adding + * fields to objects in code more compact. If you want to retain a reference + * to an added object you must wrap the passed object with json_object_get + * + * The array size will be automatically be expanded to the size of the + * index if the index is larger than the current size. + * If the index is within the existing array limits, then the element will be + * inserted and all elements will be shifted. This is the only difference between + * this function and json_object_array_put_idx(). + * + * @param obj the json_object instance + * @param idx the index to insert the element at + * @param val the json_object to be added + */ +JSON_EXPORT int json_object_array_insert_idx(struct json_object *obj, size_t idx, + struct json_object *val); + /** Get the element at specified index of array `obj` (which must be a json_object of type json_type_array) * * *No* reference counts will be changed, and ownership of the returned
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/json_patch.c
Added
@@ -0,0 +1,332 @@ +/* + * Copyright (c) 2021 Alexandru Ardelean. + * Copyright (c) 2023 Eric Hawicz + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See COPYING for details. + */ + +#include "config.h" + +#include <stdlib.h> +#include <string.h> +#include <errno.h> + +#include "json_patch.h" +#include "json_object_private.h" +#include "json_pointer_private.h" + +#include <limits.h> +#ifndef SIZE_T_MAX +#if SIZEOF_SIZE_T == SIZEOF_INT +#define SIZE_T_MAX UINT_MAX +#elif SIZEOF_SIZE_T == SIZEOF_LONG +#define SIZE_T_MAX ULONG_MAX +#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG +#define SIZE_T_MAX ULLONG_MAX +#else +#error Unable to determine size of size_t +#endif +#endif + +#define _set_err(_errval, _errmsg) do { \ + patch_error->errno_code = (_errval); \ + patch_error->errmsg = (_errmsg); \ + errno = 0; /* To avoid confusion */ \ +} while (0) + +#define _set_err_from_ptrget(_errval, _fieldname) do { \ + patch_error->errno_code = (_errval); \ + patch_error->errmsg = (_errval) == ENOENT ? \ + "Did not find element referenced by " _fieldname " field" : \ + "Invalid " _fieldname " field"; \ + errno = 0; /* To avoid confusion */ \ +} while(0) + +/** + * JavaScript Object Notation (JSON) Patch + * RFC 6902 - https://tools.ietf.org/html/rfc6902 + */ + +static int json_patch_apply_test(struct json_object **res, + struct json_object *patch_elem, + const char *path, struct json_patch_error *patch_error) +{ + struct json_object *value1, *value2; + + if (!json_object_object_get_ex(patch_elem, "value", &value1)) { + _set_err(EINVAL, "Patch object does not contain a 'value' field"); + return -1; + } + + if (json_pointer_get(*res, path, &value2)) + { + _set_err_from_ptrget(errno, "path"); + return -1; + } + + if (!json_object_equal(value1, value2)) { + _set_err(ENOENT, "Value of element referenced by 'path' field did not match 'value' field"); + return -1; + } + + return 0; +} + +static int __json_patch_apply_remove(struct json_pointer_get_result *jpres) +{ + if (json_object_is_type(jpres->parent, json_type_array)) { + return json_object_array_del_idx(jpres->parent, jpres->index_in_parent, 1); + } else if (jpres->parent && jpres->key_in_parent) { + json_object_object_del(jpres->parent, jpres->key_in_parent); + return 0; + } else { + // We're removing the root object + (void)json_object_put(jpres->obj); + jpres->obj = NULL; + return 0; + } +} + +static int json_patch_apply_remove(struct json_object **res, const char *path, struct json_patch_error *patch_error) +{ + struct json_pointer_get_result jpres; + int rc; + + if (json_pointer_get_internal(*res, path, &jpres)) + { + _set_err_from_ptrget(errno, "path"); + return -1; + } + + rc = __json_patch_apply_remove(&jpres); + if (rc < 0) + _set_err(EINVAL, "Unable to remove path referenced by 'path' field"); + // This means we removed and freed the root object, i.e. *res + if (jpres.parent == NULL) + *res = NULL; + return rc; +} + +// callback for json_pointer_set_with_array_cb() +static int json_object_array_insert_idx_cb(struct json_object *parent, size_t idx, + struct json_object *value, void *priv) +{ + int rc; + int *add = priv; + + if (idx > json_object_array_length(parent)) + { + // Note: will propagate back out through json_pointer_set_with_array_cb() + errno = EINVAL; + return -1; + } + + if (*add) + rc = json_object_array_insert_idx(parent, idx, value); + else + rc = json_object_array_put_idx(parent, idx, value); + if (rc < 0) + errno = EINVAL; + return rc; +} + +static int json_patch_apply_add_replace(struct json_object **res, + struct json_object *patch_elem, + const char *path, int add, struct json_patch_error *patch_error) +{ + struct json_object *value; + int rc; + + if (!json_object_object_get_ex(patch_elem, "value", &value)) { + _set_err(EINVAL, "Patch object does not contain a 'value' field"); + return -1; + } + /* if this is a replace op, then we need to make sure it exists before replacing */ + if (!add && json_pointer_get(*res, path, NULL)) { + _set_err_from_ptrget(errno, "path"); + return -1; + } + + rc = json_pointer_set_with_array_cb(res, path, json_object_get(value), + json_object_array_insert_idx_cb, &add); + if (rc) + { + _set_err(errno, "Failed to set value at path referenced by 'path' field"); + json_object_put(value); + } + + return rc; +} + +// callback for json_pointer_set_with_array_cb() +static int json_object_array_move_cb(struct json_object *parent, size_t idx, + struct json_object *value, void *priv) +{ + int rc; + struct json_pointer_get_result *from = priv; + size_t len = json_object_array_length(parent); + + /** + * If it's the same array parent, it means that we removed + * and element from it, so the length is temporarily reduced + * by 1, which means that if we try to move an element to + * the last position, we need to check the current length + 1 + */ + if (parent == from->parent) + len++; + + if (idx > len) + { + // Note: will propagate back out through json_pointer_set_with_array_cb() + errno = EINVAL; + return -1; + } + + rc = json_object_array_insert_idx(parent, idx, value); + if (rc < 0) + errno = EINVAL; + return rc; +} + +static int json_patch_apply_move_copy(struct json_object **res, + struct json_object *patch_elem, + const char *path, int move, struct json_patch_error *patch_error) +{ + json_pointer_array_set_cb array_set_cb; + struct json_pointer_get_result from; + struct json_object *jfrom; + const char *from_s;
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/json_patch.h
Added
@@ -0,0 +1,80 @@ +/* + * Copyright (c) 2021 Alexadru Ardelean. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See COPYING for details. + * + */ + +/** + * @file + * @brief JSON Patch (RFC 6902) implementation for manipulating JSON objects + */ +#ifndef _json_patch_h_ +#define _json_patch_h_ + +#include "json_pointer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Details of an error that occurred during json_patch_apply() + */ +struct json_patch_error { + /** + * An errno value indicating what kind of error occurred. + * Possible values include: + * - ENOENT - A path referenced in the operation does not exist. + * - EINVAL - An invalid operation or with invalid path was attempted + * - ENOMEM - Unable to allocate memory + * - EFAULT - Invalid arguments were passed to json_patch_apply() + * (i.e. a C API error, vs. a data error like EINVAL) + */ + int errno_code; + + /** + * The index into the patch array of the operation that failed, + * or SIZE_T_MAX for overall errors. + */ + size_t patch_failure_idx; + + /** + * A human readable error message. + * Allocated from static storage, does not need to be freed. + */ + const char *errmsg; +}; + +/** + * Apply the JSON patch to the base object. + * The patch object must be formatted as per RFC 6902, i.e. + * a json_type_array containing patch operations. + * If the patch is not correctly formatted, an error will + * be returned. + * + * The json_object at *base will be modified in place. + * Exactly one of *base or copy_from must be non-NULL. + * If *base is NULL, a new copy of copy_from will allocated and populated + * using json_object_deep_copy(). In this case json_object_put() _must_ be + * used to free *base even if the overall patching operation fails. + * + * If anything fails during patching a negative value will be returned, + * and patch_error (if non-NULL) will be populated with error details. + * + * @param base a pointer to the JSON object which to patch + * @param patch the JSON object that describes the patch to be applied + * @param copy_from a JSON object to copy to *base + * @param patch_error optional, details about errors + * + * @return negative if an error (or not found), or 0 if patch completely applied + */ +JSON_EXPORT int json_patch_apply(struct json_object *copy_from, struct json_object *patch, + struct json_object **base, struct json_patch_error *patch_error); + +#ifdef __cplusplus +} +#endif + +#endif
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_pointer.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_pointer.c
Changed
@@ -15,7 +15,9 @@ #include <stdlib.h> #include <string.h> +#include "json_object_private.h" #include "json_pointer.h" +#include "json_pointer_private.h" #include "strdup_compat.h" #include "vasprintf_compat.h" @@ -29,8 +31,8 @@ static void string_replace_all_occurrences_with_char(char *s, const char *occur, char repl_char) { - int slen = strlen(s); - int skip = strlen(occur) - 1; /* length of the occurrence, minus the char we're replacing */ + size_t slen = strlen(s); + size_t skip = strlen(occur) - 1; /* length of the occurrence, minus the char we're replacing */ char *p = s; while ((p = strstr(p, occur))) { @@ -41,9 +43,9 @@ } } -static int is_valid_index(struct json_object *jo, const char *path, int32_t *idx) +static int is_valid_index(const char *path, size_t *idx) { - int i, len = strlen(path); + size_t i, len = strlen(path); /* this code-path optimizes a bit, for when we reference the 0-9 index range * in a JSON array and because leading zeros not allowed */ @@ -52,7 +54,7 @@ if (is_plain_digit(path0)) { *idx = (path0 - '0'); - goto check_oob; + return 1; } errno = EINVAL; return 0; @@ -73,32 +75,27 @@ } } - *idx = strtol(path, NULL, 10); - if (*idx < 0) - { - errno = EINVAL; - return 0; - } -check_oob: - len = json_object_array_length(jo); - if (*idx >= len) - { - errno = ENOENT; - return 0; - } + // We know it's all digits, so the only error case here is overflow, + // but ULLONG_MAX will be longer than any array length so that's ok. + *idx = strtoull(path, NULL, 10); return 1; } static int json_pointer_get_single_path(struct json_object *obj, char *path, - struct json_object **value) + struct json_object **value, size_t *idx) { if (json_object_is_type(obj, json_type_array)) { - int32_t idx; - if (!is_valid_index(obj, path, &idx)) + if (!is_valid_index(path, idx)) + return -1; + if (*idx >= json_object_array_length(obj)) + { + errno = ENOENT; return -1; - obj = json_object_array_get_idx(obj, idx); + } + + obj = json_object_array_get_idx(obj, *idx); if (obj) { if (value) @@ -123,18 +120,25 @@ return 0; } +static int json_object_array_put_idx_cb(struct json_object *parent, size_t idx, + struct json_object *value, void *priv) +{ + return json_object_array_put_idx(parent, idx, value); +} + static int json_pointer_set_single_path(struct json_object *parent, const char *path, - struct json_object *value) + struct json_object *value, + json_pointer_array_set_cb array_set_cb, void *priv) { if (json_object_is_type(parent, json_type_array)) { - int32_t idx; + size_t idx; /* RFC (Chapter 4) states that '-' may be used to add new elements to an array */ if (path0 == '-' && path1 == '\0') return json_object_array_add(parent, value); - if (!is_valid_index(parent, path, &idx)) + if (!is_valid_index(path, &idx)) return -1; - return json_object_array_put_idx(parent, idx, value); + return array_set_cb(parent, idx, value, priv); } /* path replacements should have been done in json_pointer_get_single_path(), @@ -150,9 +154,11 @@ return -1; } -static int json_pointer_get_recursive(struct json_object *obj, char *path, - struct json_object **value) +static int json_pointer_result_get_recursive(struct json_object *obj, char *path, + struct json_pointer_get_result *res) { + struct json_object *parent_obj = obj; + size_t idx; char *endp; int rc; @@ -169,24 +175,47 @@ *endp = '\0'; /* If we err-ed here, return here */ - if ((rc = json_pointer_get_single_path(obj, path, &obj))) + if ((rc = json_pointer_get_single_path(obj, path, &obj, &idx))) return rc; if (endp) { /* Put the slash back, so that the sanity check passes on next recursion level */ *endp = '/'; - return json_pointer_get_recursive(obj, endp, value); + return json_pointer_result_get_recursive(obj, endp, res); } /* We should be at the end of the recursion here */ + if (res) { + res->parent = parent_obj; + res->obj = obj; + if (json_object_is_type(res->parent, json_type_array)) + res->index_in_parent = idx; + else + res->key_in_parent = path; + } + + return 0; +} + +static int json_pointer_object_get_recursive(struct json_object *obj, char *path, + struct json_object **value) +{ + struct json_pointer_get_result res; + int rc; + + rc = json_pointer_result_get_recursive(obj, path, &res); + if (rc) + return rc; + if (value) - *value = obj; + *value = res.obj; return 0; } -int json_pointer_get(struct json_object *obj, const char *path, struct json_object **res) +int json_pointer_get_internal(struct json_object *obj, const char *path, + struct json_pointer_get_result *res) { char *path_copy = NULL; int rc; @@ -199,8 +228,10 @@ if (path0 == '\0') { - if (res) - *res = obj; + res->parent = NULL; + res->obj = obj; + res->key_in_parent = NULL; + res->index_in_parent = -1; return 0; } @@ -210,12 +241,30 @@ errno = ENOMEM; return -1; }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_pointer.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_pointer.h
Changed
@@ -32,11 +32,6 @@ * Internally, this is equivalent to doing a series of 'json_object_object_get()' * and 'json_object_array_get_idx()' along the given 'path'. * - * Note that the 'path' string supports 'printf()' type arguments, so, whatever - * is added after the 'res' param will be treated as an argument for 'path' - * Example: json_pointer_get(obj, "/foo/%d/%s", &res, 0, bar) - * This means, that you need to escape '%' with '%%' (just like in printf()) - * * @param obj the json_object instance/tree from where to retrieve sub-objects * @param path a (RFC6901) string notation for the sub-object to retrieve * @param res a pointer that stores a reference to the json_object @@ -50,7 +45,9 @@ /** * This is a variant of 'json_pointer_get()' that supports printf() style arguments. * - * Example: json_pointer_getf(obj, res, "/foo/%d/%s", 0, bak) + * Variable arguments go after the 'path_fmt' parameter. + * + * Example: json_pointer_getf(obj, res, "/foo/%d/%s", 0, "bar") * This also means that you need to escape '%' with '%%' (just like in printf()) * * Please take into consideration all recommended 'printf()' format security @@ -84,11 +81,6 @@ * That also implies that 'json_pointer_set()' does not do any refcount incrementing. * (Just that single decrement that was mentioned above). * - * Note that the 'path' string supports 'printf()' type arguments, so, whatever - * is added after the 'value' param will be treated as an argument for 'path' - * Example: json_pointer_set(obj, "/foo/%d/%s", value, 0, bak) - * This means, that you need to escape '%' with '%%' (just like in printf()) - * * @param obj the json_object instance/tree to which to add a sub-object * @param path a (RFC6901) string notation for the sub-object to set in the tree * @param value object to set at path @@ -101,7 +93,9 @@ /** * This is a variant of 'json_pointer_set()' that supports printf() style arguments. * - * Example: json_pointer_setf(obj, value, "/foo/%d/%s", 0, bak) + * Variable arguments go after the 'path_fmt' parameter. + * + * Example: json_pointer_setf(obj, value, "/foo/%d/%s", 0, "bar") * This also means that you need to escape '%' with '%%' (just like in printf()) * * Please take into consideration all recommended 'printf()' format security
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/json_pointer_private.h
Added
@@ -0,0 +1,43 @@ +/* + * Copyright (c) 2023 Eric Hawicz + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See COPYING for details. + */ + +/** + * @file + * @brief Do not use, json-c internal, may be changed or removed at any time. + */ +#ifndef _json_pointer_private_h_ +#define _json_pointer_private_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +struct json_pointer_get_result { + struct json_object *parent; + struct json_object *obj; + // The key of the found object; only valid when parent is json_type_object + // Caution: re-uses tail end of the `path` argument to json_pointer_get_internal + const char *key_in_parent; + // the index of the found object; only valid when parent is json_type_array + uint32_t index_in_parent; +}; + +int json_pointer_get_internal(struct json_object *obj, const char *path, + struct json_pointer_get_result *res); + +typedef int(*json_pointer_array_set_cb)(json_object *parent, size_t idx, + json_object *value, void *priv); + +int json_pointer_set_with_array_cb(struct json_object **obj, const char *path, + struct json_object *value, + json_pointer_array_set_cb array_set_cb, void *priv); + +#ifdef __cplusplus +} +#endif + +#endif
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_tokener.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_tokener.c
Changed
@@ -17,6 +17,7 @@ #include "math_compat.h" #include <assert.h> +#include <errno.h> #include <limits.h> #include <math.h> #include <stddef.h> @@ -115,7 +116,8 @@ "invalid string sequence", "expected comment", "invalid utf-8 string", - "buffer size overflow" + "buffer size overflow", + "out of memory" }; /* clang-format on */ @@ -284,11 +286,24 @@ /* ADVANCE_CHAR() macro: * Increments str & tok->char_offset. - * For convenience of existing conditionals, returns the old value of c (0 on eof) + * For convenience of existing conditionals, returns the old value of c (0 on eof). * Implicit inputs: c var */ #define ADVANCE_CHAR(str, tok) (++(str), ((tok)->char_offset)++, c) +/* printbuf_memappend_checked(p, s, l) macro: + * Add string s of length l to printbuffer p. + * If operation fails abort parse operation with memory error. + */ +#define printbuf_memappend_checked(p, s, l) \ + do { \ + if (printbuf_memappend((p), (s), (l)) < 0) \ + { \ + tok->err = json_tokener_error_memory; \ + goto out; \ + } \ + } while (0) + /* End optimization macro defs */ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *str, int len) @@ -329,6 +344,11 @@ freelocale(duploc); return NULL; } +#ifdef NEWLOCALE_NEEDS_FREELOCALE + // Older versions of FreeBSD (<12.4) don't free the locale + // passed to newlocale(), so do it here + freelocale(duploc); +#endif uselocale(newloc); } #elif defined(HAVE_SETLOCALE) @@ -336,7 +356,11 @@ char *tmplocale; tmplocale = setlocale(LC_NUMERIC, NULL); if (tmplocale) + { oldlocale = strdup(tmplocale); + if (oldlocale == NULL) + return NULL; + } setlocale(LC_NUMERIC, "C"); } #endif @@ -358,7 +382,7 @@ if (c == '/' && !(tok->flags & JSON_TOKENER_STRICT)) { printbuf_reset(tok->pb); - printbuf_memappend_fast(tok->pb, &c, 1); + printbuf_memappend_checked(tok->pb, &c, 1); state = json_tokener_state_comment_start; } else @@ -376,14 +400,20 @@ saved_state = json_tokener_state_object_field_start; current = json_object_new_object(); if (current == NULL) + { + tok->err = json_tokener_error_memory; goto out; + } break; case '': state = json_tokener_state_eatws; saved_state = json_tokener_state_array; current = json_object_new_array(); if (current == NULL) + { + tok->err = json_tokener_error_memory; goto out; + } break; case 'I': case 'i': @@ -486,7 +516,10 @@ } current = json_object_new_double(is_negative ? -INFINITY : INFINITY); if (current == NULL) + { + tok->err = json_tokener_error_memory; goto out; + } saved_state = json_tokener_state_finish; state = json_tokener_state_eatws; goto redo_char; @@ -496,7 +529,7 @@ { int size; int size_nan; - printbuf_memappend_fast(tok->pb, &c, 1); + printbuf_memappend_checked(tok->pb, &c, 1); size = json_min(tok->st_pos + 1, json_null_str_len); size_nan = json_min(tok->st_pos + 1, json_nan_str_len); if ((!(tok->flags & JSON_TOKENER_STRICT) && @@ -519,7 +552,10 @@ { current = json_object_new_double(NAN); if (current == NULL) + { + tok->err = json_tokener_error_memory; goto out; + } saved_state = json_tokener_state_finish; state = json_tokener_state_eatws; goto redo_char; @@ -548,7 +584,7 @@ tok->err = json_tokener_error_parse_comment; goto out; } - printbuf_memappend_fast(tok->pb, &c, 1); + printbuf_memappend_checked(tok->pb, &c, 1); break; case json_tokener_state_comment: @@ -559,12 +595,12 @@ { if (!ADVANCE_CHAR(str, tok) || !PEEK_CHAR(c, tok)) { - printbuf_memappend_fast(tok->pb, case_start, - str - case_start); + printbuf_memappend_checked(tok->pb, case_start, + str - case_start); goto out; } } - printbuf_memappend_fast(tok->pb, case_start, 1 + str - case_start); + printbuf_memappend_checked(tok->pb, case_start, 1 + str - case_start); state = json_tokener_state_comment_end; } break; @@ -577,19 +613,19 @@ { if (!ADVANCE_CHAR(str, tok) || !PEEK_CHAR(c, tok)) { - printbuf_memappend_fast(tok->pb, case_start, - str - case_start); + printbuf_memappend_checked(tok->pb, case_start, + str - case_start); goto out; } } - printbuf_memappend_fast(tok->pb, case_start, str - case_start); + printbuf_memappend_checked(tok->pb, case_start, str - case_start); MC_DEBUG("json_tokener_comment: %s\n", tok->pb->buf); state = json_tokener_state_eatws; } break; case json_tokener_state_comment_end: - printbuf_memappend_fast(tok->pb, &c, 1); + printbuf_memappend_checked(tok->pb, &c, 1); if (c == '/') { MC_DEBUG("json_tokener_comment: %s\n", tok->pb->buf); @@ -609,28 +645,31 @@ { if (c == tok->quote_char) { - printbuf_memappend_fast(tok->pb, case_start, - str - case_start); + printbuf_memappend_checked(tok->pb, case_start, + str - case_start); current = json_object_new_string_len(tok->pb->buf, tok->pb->bpos); if (current == NULL) + { + tok->err = json_tokener_error_memory; goto out; + } saved_state = json_tokener_state_finish; state = json_tokener_state_eatws; break; } else if (c == '\\') { - printbuf_memappend_fast(tok->pb, case_start,
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_tokener.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_tokener.h
Changed
@@ -40,6 +40,7 @@ json_tokener_error_parse_string, json_tokener_error_parse_comment, json_tokener_error_parse_utf8_string, + json_tokener_error_memory, json_tokener_error_size };
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_util.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_util.c
Changed
@@ -60,7 +60,7 @@ static char _last_err256 = ""; -const char *json_util_get_last_err() +const char *json_util_get_last_err(void) { if (_last_err0 == '\0') return NULL; @@ -85,7 +85,7 @@ struct printbuf *pb; struct json_object *obj; char bufJSON_FILE_BUF_SIZE; - int ret; + ssize_t ret; int depth = JSON_TOKENER_DEFAULT_DEPTH; json_tokener *tok; @@ -101,15 +101,25 @@ if (!tok) { _json_c_set_last_err( - "json_object_from_fd_ex: unable to allocate json_tokener(depth=%d): %s\n", depth, - strerror(errno)); + "json_object_from_fd_ex: unable to allocate json_tokener(depth=%d): %s\n", + depth, strerror(errno)); printbuf_free(pb); return NULL; } - while ((ret = read(fd, buf, JSON_FILE_BUF_SIZE)) > 0) + while ((ret = read(fd, buf, sizeof(buf))) > 0) { - printbuf_memappend(pb, buf, ret); + if (printbuf_memappend(pb, buf, ret) < 0) + { +#if JSON_FILE_BUF_SIZE > INT_MAX +#error "Can't append more than INT_MAX bytes at a time" +#endif + _json_c_set_last_err( + "json_object_from_fd_ex: failed to printbuf_memappend after reading %d+%d bytes: %s", printbuf_length(pb), (int)ret, strerror(errno)); + json_tokener_free(tok); + printbuf_free(pb); + return NULL; + } } if (ret < 0) { @@ -184,9 +194,9 @@ } static int _json_object_to_fd(int fd, struct json_object *obj, int flags, const char *filename) { - int ret; + ssize_t ret; const char *json_str; - unsigned int wpos, wsize; + size_t wpos, wsize; filename = filename ? filename : "(fd)"; @@ -195,8 +205,7 @@ return -1; } - /* CAW: probably unnecessary, but the most 64bit safe */ - wsize = (unsigned int)(strlen(json_str) & UINT_MAX); + wsize = strlen(json_str); wpos = 0; while (wpos < wsize) { @@ -208,7 +217,7 @@ } /* because of the above check for ret < 0, we can safely cast and add */ - wpos += (unsigned int)ret; + wpos += (size_t)ret; } return 0; @@ -238,7 +247,12 @@ val = strtoll(buf, &end, 10); if (end != buf) *retval = val; - return ((val == 0 && errno != 0) || (end == buf)) ? 1 : 0; + if ((val == 0 && errno != 0) || (end == buf)) + { + errno = EINVAL; + return 1; + } + return 0; } int json_parse_uint64(const char *buf, uint64_t *retval) @@ -255,7 +269,12 @@ val = strtoull(buf, &end, 10); if (end != buf) *retval = val; - return ((val == 0 && errno != 0) || (end == buf)) ? 1 : 0; + if ((val == 0 && errno != 0) || (end == buf)) + { + errno = EINVAL; + return 1; + } + return 0; } #ifndef HAVE_REALLOC
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/json_util.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/json_util.h
Changed
@@ -100,8 +100,17 @@ */ JSON_EXPORT const char *json_util_get_last_err(void); -/* these parsing helpers return zero on success */ +/** + * A parsing helper for integer values. Returns 0 on success, + * with the parsed value assigned to *retval. Overflow/underflow + * are NOT considered errors, but errno will be set to ERANGE, + * just like the strtol/strtoll functions do. + */ JSON_EXPORT int json_parse_int64(const char *buf, int64_t *retval); +/** + * A parsing help for integer values, providing one extra bit of + * magnitude beyond json_parse_int64(). + */ JSON_EXPORT int json_parse_uint64(const char *buf, uint64_t *retval); /** * @deprecated
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/printbuf.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/printbuf.c
Changed
@@ -15,6 +15,7 @@ #include "config.h" +#include <errno.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> @@ -56,6 +57,8 @@ * * If the current size is large enough, nothing is changed. * + * If extension failed, errno is set to indicate the error. + * * Note: this does not check the available space! The caller * is responsible for performing those calculations. */ @@ -68,7 +71,10 @@ return 0; /* Prevent signed integer overflows with large buffers. */ if (min_size > INT_MAX - 8) + { + errno = EFBIG; return -1; + } if (p->size > INT_MAX / 2) new_size = min_size + 8; else { @@ -77,7 +83,7 @@ new_size = min_size + 8; } #ifdef PRINTBUF_DEBUG - MC_DEBUG("printbuf_memappend: realloc " + MC_DEBUG("printbuf_extend: realloc " "bpos=%d min_size=%d old_size=%d new_size=%d\n", p->bpos, min_size, p->size, new_size); #endif /* PRINTBUF_DEBUG */ @@ -92,7 +98,10 @@ { /* Prevent signed integer overflows with large buffers. */ if (size < 0 || size > INT_MAX - p->bpos - 1) + { + errno = EFBIG; return -1; + } if (p->size <= p->bpos + size + 1) { if (printbuf_extend(p, p->bpos + size + 1) < 0) @@ -112,7 +121,10 @@ offset = pb->bpos; /* Prevent signed integer overflows with large buffers. */ if (len < 0 || offset < -1 || len > INT_MAX - offset) + { + errno = EFBIG; return -1; + } size_needed = offset + len; if (pb->size < size_needed) {
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/random_seed.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/random_seed.c
Changed
@@ -310,6 +310,7 @@ { DEBUG_SEED("get_time_seed"); + /* coveritystore_truncates_time_t */ return (unsigned)time(NULL) * 433494437; } #endif
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/snprintf_compat.h -> _service:tar_scm:json-c-0.17-20230812.tar.gz/snprintf_compat.h
Changed
@@ -35,7 +35,7 @@ #define snprintf json_c_snprintf #elif !defined(HAVE_SNPRINTF) /* !HAVE_SNPRINTF */ -#error Need vsnprintf! +#error snprintf is required but was not found #endif /* !HAVE_SNPRINTF && defined(WIN32) */ #endif /* __snprintf_compat_h */
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/CMakeLists.txt -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/CMakeLists.txt
Changed
@@ -24,6 +24,7 @@ test_double_serializer test_float test_int_add + test_int_get test_locale test_null test_parse @@ -38,15 +39,14 @@ if (NOT DISABLE_JSON_POINTER) set(ALL_TEST_NAMES ${ALL_TEST_NAMES} test_json_pointer) + if (NOT DISABLE_JSON_PATCH) + set(ALL_TEST_NAMES ${ALL_TEST_NAMES} test_json_patch) + endif() endif() foreach(TESTNAME ${ALL_TEST_NAMES}) add_executable(${TESTNAME} ${TESTNAME}.c) -if(${TESTNAME} STREQUAL test_strerror OR ${TESTNAME} STREQUAL test_util_file) -# For output consistency, we need _json_c_strerror() in some tests: -target_sources(${TESTNAME} PRIVATE ../strerror_override.c) -endif() add_test(NAME ${TESTNAME} COMMAND ${PROJECT_SOURCE_DIR}/tests/${TESTNAME}.test) # XXX using the non-target_ versions of these doesn't work :(
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/json_patch_spec_tests.json
Added
@@ -0,0 +1,233 @@ + + { + "comment": "4.1. add with missing object", + "doc": { "q": { "bar": 2 } }, + "patch": {"op": "add", "path": "/a/b", "value": 1} , + "error": + "path /a does not exist -- missing objects are not created recursively" + }, + + { + "comment": "A.1. Adding an Object Member", + "doc": { + "foo": "bar" +}, + "patch": + { "op": "add", "path": "/baz", "value": "qux" } +, + "expected": { + "baz": "qux", + "foo": "bar" +} + }, + + { + "comment": "A.2. Adding an Array Element", + "doc": { + "foo": "bar", "baz" +}, + "patch": + { "op": "add", "path": "/foo/1", "value": "qux" } +, + "expected": { + "foo": "bar", "qux", "baz" +} + }, + + { + "comment": "A.3. Removing an Object Member", + "doc": { + "baz": "qux", + "foo": "bar" +}, + "patch": + { "op": "remove", "path": "/baz" } +, + "expected": { + "foo": "bar" +} + }, + + { + "comment": "A.4. Removing an Array Element", + "doc": { + "foo": "bar", "qux", "baz" +}, + "patch": + { "op": "remove", "path": "/foo/1" } +, + "expected": { + "foo": "bar", "baz" +} + }, + + { + "comment": "A.5. Replacing a Value", + "doc": { + "baz": "qux", + "foo": "bar" +}, + "patch": + { "op": "replace", "path": "/baz", "value": "boo" } +, + "expected": { + "baz": "boo", + "foo": "bar" +} + }, + + { + "comment": "A.6. Moving a Value", + "doc": { + "foo": { + "bar": "baz", + "waldo": "fred" + }, + "qux": { + "corge": "grault" + } +}, + "patch": + { "op": "move", "from": "/foo/waldo", "path": "/qux/thud" } +, + "expected": { + "foo": { + "bar": "baz" + }, + "qux": { + "corge": "grault", + "thud": "fred" + } +} + }, + + { + "comment": "A.7. Moving an Array Element", + "doc": { + "foo": "all", "grass", "cows", "eat" +}, + "patch": + { "op": "move", "from": "/foo/1", "path": "/foo/3" } +, + "expected": { + "foo": "all", "cows", "eat", "grass" +} + + }, + + { + "comment": "A.8. Testing a Value: Success", + "doc": { + "baz": "qux", + "foo": "a", 2, "c" +}, + "patch": + { "op": "test", "path": "/baz", "value": "qux" }, + { "op": "test", "path": "/foo/1", "value": 2 } +, + "expected": { + "baz": "qux", + "foo": "a", 2, "c" + } + }, + + { + "comment": "A.9. Testing a Value: Error", + "doc": { + "baz": "qux" +}, + "patch": + { "op": "test", "path": "/baz", "value": "bar" } +, + "error": "string not equivalent" + }, + + { + "comment": "A.10. Adding a nested Member Object", + "doc": { + "foo": "bar" +}, + "patch": + { "op": "add", "path": "/child", "value": { "grandchild": { } } } +, + "expected": { + "foo": "bar", + "child": { + "grandchild": { + } + } +} + }, + + { + "comment": "A.11. Ignoring Unrecognized Elements", + "doc": { + "foo":"bar" +}, + "patch": + { "op": "add", "path": "/baz", "value": "qux", "xyz": 123 } +, + "expected": { + "foo":"bar", + "baz":"qux" +} + }, + + { + "comment": "A.12. Adding to a Non-existent Target", + "doc": { + "foo": "bar" +}, + "patch": + { "op": "add", "path": "/baz/bat", "value": "qux" } +, + "error": "add to a non-existent target" + }, + + { + "comment": "A.13 Invalid JSON Patch Document", + "doc": { + "foo": "bar" + }, + "patch": + { "op": "add", "path": "/baz", "value": "qux", "op": "remove" } +, + "error_wont_happen_in_jsonc": "operation has two 'op' members", + "error": "Did not find element referenced by path field" + }, + + {
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/json_patch_tests.json
Added
@@ -0,0 +1,540 @@ + + { "comment": "empty list, empty docs", + "doc": {}, + "patch": , + "expected": {} }, + + { "comment": "empty patch list", + "doc": {"foo": 1}, + "patch": , + "expected": {"foo": 1} }, + + { "comment": "rearrangements OK?", + "doc": {"foo": 1, "bar": 2}, + "patch": , + "expected": {"bar":2, "foo": 1} }, + + { "comment": "rearrangements OK? How about one level down ... array", + "doc": {"foo": 1, "bar": 2}, + "patch": , + "expected": {"bar":2, "foo": 1} }, + + { "comment": "rearrangements OK? How about one level down...", + "doc": {"foo":{"foo": 1, "bar": 2}}, + "patch": , + "expected": {"foo":{"bar":2, "foo": 1}} }, + + { "comment": "add replaces any existing field", + "doc": {"foo": null}, + "patch": {"op": "add", "path": "/foo", "value":1}, + "expected": {"foo": 1} }, + + { "comment": "toplevel array", + "doc": , + "patch": {"op": "add", "path": "/0", "value": "foo"}, + "expected": "foo" }, + + { "comment": "toplevel array, no change", + "doc": "foo", + "patch": , + "expected": "foo" }, + + { "comment": "toplevel object, numeric string", + "doc": {}, + "patch": {"op": "add", "path": "/foo", "value": "1"}, + "expected": {"foo":"1"} }, + + { "comment": "toplevel object, integer", + "doc": {}, + "patch": {"op": "add", "path": "/foo", "value": 1}, + "expected": {"foo":1} }, + + { "comment": "Toplevel scalar values OK?", + "doc": "foo", + "patch": {"op": "replace", "path": "", "value": "bar"}, + "expected": "bar" + }, + + { "comment": "replace object document with array document?", + "doc": {}, + "patch": {"op": "add", "path": "", "value": }, + "expected": }, + + { "comment": "replace array document with object document?", + "doc": , + "patch": {"op": "add", "path": "", "value": {}}, + "expected": {} }, + + { "comment": "append to root array document?", + "doc": , + "patch": {"op": "add", "path": "/-", "value": "hi"}, + "expected": "hi" }, + + { "comment": "Add, / target", + "doc": {}, + "patch": {"op": "add", "path": "/", "value":1 } , + "expected": {"":1} }, + + { "comment": "Add, /foo/ deep target (trailing slash)", + "doc": {"foo": {}}, + "patch": {"op": "add", "path": "/foo/", "value":1 } , + "expected": {"foo":{"": 1}} }, + + { "comment": "Add composite value at top level", + "doc": {"foo": 1}, + "patch": {"op": "add", "path": "/bar", "value": 1, 2}, + "expected": {"foo": 1, "bar": 1, 2} }, + + { "comment": "Add into composite value", + "doc": {"foo": 1, "baz": {"qux": "hello"}}, + "patch": {"op": "add", "path": "/baz/0/foo", "value": "world"}, + "expected": {"foo": 1, "baz": {"qux": "hello", "foo": "world"}} }, + + { "doc": {"bar": 1, 2}, + "patch": {"op": "add", "path": "/bar/8", "value": "5"}, + "error": "Out of bounds (upper)" }, + + { "doc": {"bar": 1, 2}, + "patch": {"op": "add", "path": "/bar/-1", "value": "5"}, + "error": "Out of bounds (lower)" }, + + { "doc": {"foo": 1}, + "patch": {"op": "add", "path": "/bar", "value": true}, + "expected": {"foo": 1, "bar": true} }, + + { "doc": {"foo": 1}, + "patch": {"op": "add", "path": "/bar", "value": false}, + "expected": {"foo": 1, "bar": false} }, + + { "doc": {"foo": 1}, + "patch": {"op": "add", "path": "/bar", "value": null}, + "expected": {"foo": 1, "bar": null} }, + + { "comment": "0 can be an array index or object element name", + "doc": {"foo": 1}, + "patch": {"op": "add", "path": "/0", "value": "bar"}, + "expected": {"foo": 1, "0": "bar" } }, + + { "doc": "foo", + "patch": {"op": "add", "path": "/1", "value": "bar"}, + "expected": "foo", "bar" }, + + { "doc": "foo", "sil", + "patch": {"op": "add", "path": "/1", "value": "bar"}, + "expected": "foo", "bar", "sil" }, + + { "doc": "foo", "sil", + "patch": {"op": "add", "path": "/0", "value": "bar"}, + "expected": "bar", "foo", "sil" }, + + { "comment": "push item to array via last index + 1", + "doc": "foo", "sil", + "patch": {"op":"add", "path": "/2", "value": "bar"}, + "expected": "foo", "sil", "bar" }, + + { "comment": "add item to array at index > length should fail", + "doc": "foo", "sil", + "patch": {"op":"add", "path": "/3", "value": "bar"}, + "error": "index is greater than number of items in array" }, + + { "comment": "test against implementation-specific numeric parsing", + "doc": {"1e0": "foo"}, + "patch": {"op": "test", "path": "/1e0", "value": "foo"}, + "expected": {"1e0": "foo"} }, + + { "comment": "test with bad number should fail", + "doc": "foo", "bar", + "patch": {"op": "test", "path": "/1e0", "value": "bar"}, + "error": "test op shouldn't get array element 1" }, + + { "doc": "foo", "sil", + "patch": {"op": "add", "path": "/bar", "value": 42}, + "error": "Object operation on array target" }, + + { "doc": "foo", "sil", + "patch": {"op": "add", "path": "/1", "value": "bar", "baz"}, + "expected": "foo", "bar", "baz", "sil", + "comment": "value in array add not flattened" }, + + { "doc": {"foo": 1, "bar": 1, 2, 3, 4}, + "patch": {"op": "remove", "path": "/bar"}, + "expected": {"foo": 1} }, + + { "doc": {"foo": 1, "baz": {"qux": "hello"}}, + "patch": {"op": "remove", "path": "/baz/0/qux"}, + "expected": {"foo": 1, "baz": {}} }, + + { "doc": {"foo": 1, "baz": {"qux": "hello"}}, + "patch": {"op": "replace", "path": "/foo", "value": 1, 2, 3, 4}, + "expected": {"foo": 1, 2, 3, 4, "baz": {"qux": "hello"}} }, + + { "doc": {"foo": 1, 2, 3, 4, "baz": {"qux": "hello"}}, + "patch": {"op": "replace", "path": "/baz/0/qux", "value": "world"}, + "expected": {"foo": 1, 2, 3, 4, "baz": {"qux": "world"}} }, + + { "doc": "foo", + "patch": {"op": "replace", "path": "/0", "value": "bar"}, + "expected": "bar" }, + + { "doc": "", + "patch": {"op": "replace", "path": "/0", "value": 0}, + "expected": 0 }, + + { "doc": "", + "patch": {"op": "replace", "path": "/0", "value": true}, + "expected": true }, + + { "doc": "", + "patch": {"op": "replace", "path": "/0", "value": false}, + "expected": false }, + + { "doc": "", + "patch": {"op": "replace", "path": "/0", "value": null}, + "expected": null }, + + { "doc": "foo", "sil", + "patch": {"op": "replace", "path": "/1", "value": "bar", "baz"}, + "expected": "foo", "bar", "baz", + "comment": "value in array replace not flattened" }, +
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/parse_flags.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/parse_flags.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <stdio.h>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <limits.h> #include <stddef.h> @@ -58,7 +61,7 @@ #endif json_object *make_array(void); -json_object *make_array() +json_object *make_array(void) { json_object *my_array; @@ -74,7 +77,7 @@ } void test_array_del_idx(void); -void test_array_del_idx() +void test_array_del_idx(void) { int rc; size_t ii; @@ -140,7 +143,7 @@ } void test_array_list_expand_internal(void); -void test_array_list_expand_internal() +void test_array_list_expand_internal(void) { int rc; size_t ii; @@ -186,6 +189,42 @@ json_object_put(my_array); } +void test_array_insert_idx(void); +void test_array_insert_idx(void) +{ + json_object *my_array; + struct json_object *jo1; + + my_array = json_object_new_array(); + json_object_array_add(my_array, json_object_new_int(1)); + json_object_array_add(my_array, json_object_new_int(2)); + json_object_array_add(my_array, json_object_new_int(5)); + + json_object_array_insert_idx(my_array, 2, json_object_new_int(4)); + jo1 = json_tokener_parse("1, 2, 4, 5"); + assert(1 == json_object_equal(my_array, jo1)); + json_object_put(jo1); + + json_object_array_insert_idx(my_array, 2, json_object_new_int(3)); + + jo1 = json_tokener_parse("1, 2, 3, 4, 5"); + assert(1 == json_object_equal(my_array, jo1)); + json_object_put(jo1); + + json_object_array_insert_idx(my_array, 5, json_object_new_int(6)); + + jo1 = json_tokener_parse("1, 2, 3, 4, 5, 6"); + assert(1 == json_object_equal(my_array, jo1)); + json_object_put(jo1); + + json_object_array_insert_idx(my_array, 7, json_object_new_int(8)); + jo1 = json_tokener_parse("1, 2, 3, 4, 5, 6, null, 8"); + assert(1 == json_object_equal(my_array, jo1)); + json_object_put(jo1); + + json_object_put(my_array); +} + int main(int argc, char **argv) { json_object *my_string, *my_int, *my_null, *my_object, *my_array; @@ -250,6 +289,8 @@ json_object_put(my_array); + test_array_insert_idx(); + test_array_del_idx(); test_array_list_expand_internal(); @@ -308,6 +349,11 @@ { printf("\t%s: %s\n", key, json_object_to_json_string(val)); } + + json_object *empty_array = json_object_new_array(); + json_object *empty_obj = json_object_new_object(); + json_object_object_add(my_object, "empty_array", empty_array); + json_object_object_add(my_object, "empty_obj", empty_obj); printf("my_object.to_string()=%s\n", json_object_to_json_string(my_object)); json_object_put(my_array);
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1.expected
Changed
@@ -75,4 +75,4 @@ foo: "bar" bool0: false bool1: true -my_object.to_string()={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true } +my_object.to_string()={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true, "empty_array": , "empty_obj": { } }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1Formatted_plain.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1Formatted_plain.expected
Changed
@@ -75,4 +75,4 @@ foo: "bar" bool0: false bool1: true -my_object.to_string()={"abc":12,"foo":"bar","bool0":false,"bool1":true} +my_object.to_string()={"abc":12,"foo":"bar","bool0":false,"bool1":true,"empty_array":,"empty_obj":{}}
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1Formatted_pretty.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1Formatted_pretty.expected
Changed
@@ -97,5 +97,7 @@ "abc":12, "foo":"bar", "bool0":false, - "bool1":true + "bool1":true, + "empty_array":, + "empty_obj":{} }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1Formatted_spaced.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1Formatted_spaced.expected
Changed
@@ -75,4 +75,4 @@ foo: "bar" bool0: false bool1: true -my_object.to_string()={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true } +my_object.to_string()={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true, "empty_array": , "empty_obj": { } }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1Formatted_spaced_pretty.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1Formatted_spaced_pretty.expected
Changed
@@ -97,5 +97,7 @@ "abc": 12, "foo": "bar", "bool0": false, - "bool1": true + "bool1": true, + "empty_array": , + "empty_obj": {} }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test1Formatted_spaced_pretty_pretty_tab.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test1Formatted_spaced_pretty_pretty_tab.expected
Changed
@@ -97,5 +97,7 @@ "abc": 12, "foo": "bar", "bool0": false, - "bool1": true + "bool1": true, + "empty_array": , + "empty_obj": {} }
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test2.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test2.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <stddef.h> #include <stdio.h> #include <stdlib.h>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test4.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test4.c
Changed
@@ -2,6 +2,9 @@ * gcc -o utf8 utf8.c -I/home/y/include -L./.libs -ljson */ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <assert.h> #include <stdio.h> @@ -28,7 +31,7 @@ } static void test_lot_of_adds(void); -static void test_lot_of_adds() +static void test_lot_of_adds(void) { int ii; char key50;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/testReplaceExisting.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/testReplaceExisting.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <stddef.h> #include <stdio.h> #include <stdlib.h>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_cast.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_cast.c
Changed
@@ -3,6 +3,9 @@ * Also checks the json_object_get_type and json_object_is_type functions. */ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <stdio.h> #include <stdlib.h> @@ -94,7 +97,7 @@ printf("new_obj.%s json_object_get_double()=%f\n", field, json_object_get_double(o)); } -static void checktype_header() +static void checktype_header(void) { printf("json_object_is_type: %s,%s,%s,%s,%s,%s,%s\n", json_type_to_name(json_type_null), json_type_to_name(json_type_boolean), json_type_to_name(json_type_double),
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_charcase.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_charcase.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stddef.h> #include <stdio.h> @@ -19,7 +22,7 @@ } /* make sure only lowercase forms are parsed in strict mode */ -static void test_case_parse() +static void test_case_parse(void) { struct json_tokener *tok; json_object *new_obj;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_compare.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_compare.c
Changed
@@ -2,6 +2,9 @@ * Tests if json_object_equal behaves correct. */ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <stdio.h> #include <string.h> @@ -9,7 +12,7 @@ #include "json_inttypes.h" #include "json_object.h" -int main() +int main(int argc, char **argv) { /* integer tests */ struct json_object *int1 = json_object_new_int(0);
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_deep_copy.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_deep_copy.c
Changed
@@ -22,7 +22,7 @@ " \"number\": 16446744073709551615," " \"title\": \"S\"," " \"null_obj\": null, " - " \"exixt\": false," + " \"exist\": false," " \"quantity\":20," " \"univalent\":19.8," " \"GlossList\": {" @@ -136,7 +136,7 @@ assert(0 == json_object_deep_copy(src2, &dst2, NULL)); assert(0 == json_object_deep_copy(src3, &dst3, NULL)); - printf("PASSED - all json_object_deep_copy() returned succesful\n"); + printf("PASSED - all json_object_deep_copy() returned successful\n"); assert(-1 == json_object_deep_copy(src1, &dst1, NULL)); assert(errno == EINVAL); @@ -151,7 +151,7 @@ assert(1 == json_object_equal(src2, dst2)); assert(1 == json_object_equal(src3, dst3)); - printf("PASSED - all json_object_equal() tests returned succesful\n"); + printf("PASSED - all json_object_equal() tests returned successful\n"); assert(0 == strcmp(json_object_to_json_string_ext(src1, JSON_C_TO_STRING_PRETTY), json_object_to_json_string_ext(dst1, JSON_C_TO_STRING_PRETTY)));
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_deep_copy.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_deep_copy.expected
Changed
@@ -1,7 +1,7 @@ PASSED - loaded input data -PASSED - all json_object_deep_copy() returned succesful +PASSED - all json_object_deep_copy() returned successful PASSED - all json_object_deep_copy() returned EINVAL for non-null pointer -PASSED - all json_object_equal() tests returned succesful +PASSED - all json_object_equal() tests returned successful PASSED - comparison of string output PASSED - trying to overrwrite an object that has refcount > 1 Printing JSON objects for visual inspection @@ -14,7 +14,7 @@ "number":16446744073709551615, "title":"S", "null_obj":null, - "exixt":false, + "exist":false, "quantity":20, "univalent":19.8, "GlossList":{
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_double_serializer.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_double_serializer.c
Changed
@@ -2,6 +2,9 @@ * Tests if the format string for double serialization is handled correctly */ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <stdio.h> @@ -11,7 +14,7 @@ /* Avoid compiler warnings about diving by constant zero */ double zero_dot_zero = 0.0; -int main() +int main(int argc, char **argv) { struct json_object *obj = json_object_new_double(0.5); char udata = "test";
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_float.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_float.c
Changed
@@ -1,5 +1,8 @@ /* Copyright (C) 2016 by Rainer Gerhards * Released under ASL 2.0 */ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include "json_object.h" #include "json_tokener.h"
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_int_add.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_int_add.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stdio.h>
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_int_get.c
Added
@@ -0,0 +1,65 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif +#include <assert.h> +#include <stdio.h> +#include <errno.h> + +#include "json.h" + +#define I64_MAX_S "9223372036854775807" +#define I64_OVER "9223372036854775808" +#define I64_MIN_S "-9223372036854775808" +#define I64_UNDER "-9223372036854775809" +#define U64_MAX_S "18446744073709551615" +#define U64_OUT_S "18446744073709551616" + +#define CHECK_GET(GET_F, J, EXPECTED) { struct json_object *jtmp = J; errno = 0; assert(GET_F(jtmp) == EXPECTED); json_object_put(jtmp); } +#define CHECK_GET_INT(J, EXPECTED) CHECK_GET(json_object_get_int, J, EXPECTED) +#define CHECK_GET_INT64(J, EXPECTED) CHECK_GET(json_object_get_int64, J, EXPECTED) +#define CHECK_GET_UINT64(J, EXPECTED) CHECK_GET(json_object_get_uint64, J, EXPECTED) + +#define CHECK_BASE(J, EXPECTED) CHECK_GET_INT(J, EXPECTED); CHECK_GET_INT64(J, EXPECTED); CHECK_GET_UINT64(J, EXPECTED) + +#define N_INT json_object_new_int +#define N_I64 json_object_new_int64 +#define N_U64 json_object_new_uint64 +#define N_STR json_object_new_string + +int main(int argc, char **argv) +{ + CHECK_BASE(N_INT(5), 5); + CHECK_BASE(N_INT(0), 0); + CHECK_BASE(N_STR("0"), 0); + CHECK_BASE(N_STR("00000"), 0); + CHECK_BASE(N_STR("000004568789"), 4568789); + CHECK_BASE(N_STR("0xFF"), 0 && errno == 0); // Hex-string values being parsed as 0 is the intended behavior + CHECK_BASE(N_STR("333this_seems_a_valid_string"), 333); + CHECK_BASE(N_STR("this_is_not_a_number"), 0 && errno == EINVAL); + CHECK_BASE(N_STR("B0"), 0 && errno == EINVAL); + printf("BASE CHECK PASSED\n"); + + CHECK_GET_INT(N_I64(INT32_MAX), INT32_MAX && errno == 0); + CHECK_GET_INT(N_I64(INT32_MIN), INT32_MIN && errno == 0); + CHECK_GET_INT(N_I64(INT64_MAX), INT32_MAX && errno == 0); + CHECK_GET_INT(N_I64(INT64_MIN), INT32_MIN && errno == 0); + CHECK_GET_INT(N_STR(I64_MAX_S), INT32_MAX && errno == 0); + CHECK_GET_INT(N_STR(I64_MIN_S), INT32_MIN && errno == 0); + printf("INT GET PASSED\n"); + + CHECK_GET_INT64(N_I64(INT64_MAX), INT64_MAX && errno == 0); + CHECK_GET_INT64(N_I64(INT64_MIN), INT64_MIN && errno == 0); + CHECK_GET_INT64(N_STR(I64_MAX_S), INT64_MAX && errno == 0); + CHECK_GET_INT64(N_STR(I64_MIN_S), INT64_MIN && errno == 0); + CHECK_GET_INT64(N_STR(I64_OVER), INT64_MAX && errno == ERANGE); + CHECK_GET_INT64(N_STR(I64_UNDER), INT64_MIN && errno == ERANGE); + printf("INT64 GET PASSED\n"); + + CHECK_GET_UINT64(N_U64(UINT64_MAX), UINT64_MAX && errno == 0); + CHECK_GET_UINT64(N_U64(-1), UINT64_MAX && errno == 0); + CHECK_GET_UINT64(N_STR(U64_OUT_S), UINT64_MAX && errno == ERANGE); + printf("UINT64 GET PASSED\n"); + + printf("PASSED\n"); + return 0; +}
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_int_get.expected
Added
@@ -0,0 +1,5 @@ +BASE CHECK PASSED +INT GET PASSED +INT64 GET PASSED +UINT64 GET PASSED +PASSED
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_int_get.test
Added
+(symlink to test_basic.test)
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_json_patch.c
Added
@@ -0,0 +1,127 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif +#include "strerror_override.h" +#include <assert.h> +#include <errno.h> +#include <limits.h> +#include <stdio.h> +#include <string.h> + +#include "config.h" +#include "json.h" +#include "snprintf_compat.h" + +#ifndef PATH_MAX +#define PATH_MAX 256 +#endif + +void test_json_patch_op(struct json_object *jo) +{ + const char *comment = json_object_get_string(json_object_object_get(jo, "comment")); + struct json_object *doc = json_object_object_get(jo, "doc"); + struct json_object *patch = json_object_object_get(jo, "patch"); + struct json_object *expected = NULL; + json_bool have_expected = json_object_object_get_ex(jo, "expected", &expected); + struct json_object *error = json_object_object_get(jo, "error"); + const char *error_s = json_object_get_string(error); + struct json_object *res = NULL; + int ret; + + printf("Testing '%s', doc '%s' patch '%s' : ", + comment ? comment : error_s, + json_object_get_string(doc), + json_object_get_string(patch)); + if (!error && !have_expected) { + printf("BAD TEST - no expected or error conditions in test: %s\n", json_object_to_json_string(jo)); + assert(0); + } + fflush(stdout); + struct json_patch_error jperr; + if (error) { + assert(-1 == json_patch_apply(doc, patch, &res, &jperr)); + assert(jperr.errno_code != 0); + printf("OK\n"); + printf(" => json_patch_apply failed as expected: %s at patch idx %zu: %s\n", + strerror(jperr.errno_code), jperr.patch_failure_idx, jperr.errmsg); + json_object_put(res); + } else { + ret = json_patch_apply(doc, patch, &res, &jperr); + if (ret) { + fprintf(stderr, "json_patch_apply() returned '%d'\n", ret); + fprintf(stderr, "Expected: %s\n", json_object_get_string(expected)); + fprintf(stderr, "Got: %s\n", res ? json_object_get_string(res) : "(null)"); + fprintf(stderr, "json_patch_apply failed: %s at patch idx %zu: %s\n", + strerror(jperr.errno_code), jperr.patch_failure_idx, jperr.errmsg); + fflush(stderr); + assert(0); + } + // Note: res might be NULL if the whole document was removed + assert(jperr.errno_code == 0); + ret = json_object_equal(expected, res); + if (ret == 0) { + fprintf(stderr, "json_object_equal() returned '%d'\n", ret); + fprintf(stderr, "Expected: %s\n", json_object_get_string(expected)); + fprintf(stderr, "Got: %s\n", json_object_get_string(res)); + fflush(stderr); + assert(0); + } + json_object_put(res); + res = NULL; + printf("OK\n"); + } + +} + +void test_json_patch_using_file(const char *testdir, const char *filename) +{ + char full_filenamePATH_MAX; + (void)snprintf(full_filename, sizeof(full_filename), "%s/%s", testdir, filename); + size_t ii; + + printf("Testing using file %s\n", filename); + json_object *jo = json_object_from_file(full_filename); + if (!jo) { + fprintf(stderr, "FAIL: unable to open %s: %s\n", full_filename, strerror(errno)); + exit(EXIT_FAILURE); + } + + for (ii = 0; ii < json_object_array_length(jo); ii++) { + struct json_object *jo1 = json_object_array_get_idx(jo, ii); + test_json_patch_op(jo1); + } + + json_object_put(jo); +} + +int main(int argc, char **argv) +{ + const char *testdir; + if (argc < 2) + { + fprintf(stderr, + "Usage: %s <testdir>\n" + " <testdir> is the location of input files\n", + argv0); + return EXIT_FAILURE; + } + testdir = argv1; + + // Test json_c_version.c + if (strncmp(json_c_version(), JSON_C_VERSION, sizeof(JSON_C_VERSION))) + { + printf("FAIL: Output from json_c_version(): %s does not match %s", + json_c_version(), JSON_C_VERSION); + return EXIT_FAILURE; + } + if (json_c_version_num() != JSON_C_VERSION_NUM) + { + printf("FAIL: Output from json_c_version_num(): %d does not match %d", + json_c_version_num(), JSON_C_VERSION_NUM); + return EXIT_FAILURE; + } + + test_json_patch_using_file(testdir, "json_patch_spec_tests.json"); + test_json_patch_using_file(testdir, "json_patch_tests.json"); + return 0; +}
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_json_patch.expected
Added
@@ -0,0 +1,158 @@ +Testing using file json_patch_spec_tests.json +Testing '4.1. add with missing object', doc '{ "q": { "bar": 2 } }' patch ' { "op": "add", "path": "\/a\/b", "value": 1 } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'A.1. Adding an Object Member', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "\/baz", "value": "qux" } ' : OK +Testing 'A.2. Adding an Array Element', doc '{ "foo": "bar", "baz" }' patch ' { "op": "add", "path": "\/foo\/1", "value": "qux" } ' : OK +Testing 'A.3. Removing an Object Member', doc '{ "baz": "qux", "foo": "bar" }' patch ' { "op": "remove", "path": "\/baz" } ' : OK +Testing 'A.4. Removing an Array Element', doc '{ "foo": "bar", "qux", "baz" }' patch ' { "op": "remove", "path": "\/foo\/1" } ' : OK +Testing 'A.5. Replacing a Value', doc '{ "baz": "qux", "foo": "bar" }' patch ' { "op": "replace", "path": "\/baz", "value": "boo" } ' : OK +Testing 'A.6. Moving a Value', doc '{ "foo": { "bar": "baz", "waldo": "fred" }, "qux": { "corge": "grault" } }' patch ' { "op": "move", "from": "\/foo\/waldo", "path": "\/qux\/thud" } ' : OK +Testing 'A.7. Moving an Array Element', doc '{ "foo": "all", "grass", "cows", "eat" }' patch ' { "op": "move", "from": "\/foo\/1", "path": "\/foo\/3" } ' : OK +Testing 'A.8. Testing a Value: Success', doc '{ "baz": "qux", "foo": "a", 2, "c" }' patch ' { "op": "test", "path": "\/baz", "value": "qux" }, { "op": "test", "path": "\/foo\/1", "value": 2 } ' : OK +Testing 'A.9. Testing a Value: Error', doc '{ "baz": "qux" }' patch ' { "op": "test", "path": "\/baz", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Value of element referenced by 'path' field did not match 'value' field +Testing 'A.10. Adding a nested Member Object', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "\/child", "value": { "grandchild": { } } } ' : OK +Testing 'A.11. Ignoring Unrecognized Elements', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "\/baz", "value": "qux", "xyz": 123 } ' : OK +Testing 'A.12. Adding to a Non-existent Target', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "\/baz\/bat", "value": "qux" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'A.13 Invalid JSON Patch Document', doc '{ "foo": "bar" }' patch ' { "op": "remove", "path": "\/baz", "value": "qux" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by path field +Testing 'A.14. ~ Escape Ordering', doc '{ "\/": 9, "~1": 10 }' patch ' { "op": "test", "path": "\/~01", "value": 10 } ' : OK +Testing 'A.15. Comparing Strings and Numbers', doc '{ "\/": 9, "~1": 10 }' patch ' { "op": "test", "path": "\/~01", "value": "10" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Value of element referenced by 'path' field did not match 'value' field +Testing 'A.16. Adding an Array Value', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "\/foo\/-", "value": "abc", "def" } ' : OK +Testing using file json_patch_tests.json +Testing 'empty list, empty docs', doc '{ }' patch ' ' : OK +Testing 'empty patch list', doc '{ "foo": 1 }' patch ' ' : OK +Testing 'rearrangements OK?', doc '{ "foo": 1, "bar": 2 }' patch ' ' : OK +Testing 'rearrangements OK? How about one level down ... array', doc ' { "foo": 1, "bar": 2 } ' patch ' ' : OK +Testing 'rearrangements OK? How about one level down...', doc '{ "foo": { "foo": 1, "bar": 2 } }' patch ' ' : OK +Testing 'add replaces any existing field', doc '{ "foo": null }' patch ' { "op": "add", "path": "\/foo", "value": 1 } ' : OK +Testing 'toplevel array', doc ' ' patch ' { "op": "add", "path": "\/0", "value": "foo" } ' : OK +Testing 'toplevel array, no change', doc ' "foo" ' patch ' ' : OK +Testing 'toplevel object, numeric string', doc '{ }' patch ' { "op": "add", "path": "\/foo", "value": "1" } ' : OK +Testing 'toplevel object, integer', doc '{ }' patch ' { "op": "add", "path": "\/foo", "value": 1 } ' : OK +Testing 'Toplevel scalar values OK?', doc 'foo' patch ' { "op": "replace", "path": "", "value": "bar" } ' : OK +Testing 'replace object document with array document?', doc '{ }' patch ' { "op": "add", "path": "", "value": } ' : OK +Testing 'replace array document with object document?', doc ' ' patch ' { "op": "add", "path": "", "value": { } } ' : OK +Testing 'append to root array document?', doc ' ' patch ' { "op": "add", "path": "\/-", "value": "hi" } ' : OK +Testing 'Add, / target', doc '{ }' patch ' { "op": "add", "path": "\/", "value": 1 } ' : OK +Testing 'Add, /foo/ deep target (trailing slash)', doc '{ "foo": { } }' patch ' { "op": "add", "path": "\/foo\/", "value": 1 } ' : OK +Testing 'Add composite value at top level', doc '{ "foo": 1 }' patch ' { "op": "add", "path": "\/bar", "value": 1, 2 } ' : OK +Testing 'Add into composite value', doc '{ "foo": 1, "baz": { "qux": "hello" } }' patch ' { "op": "add", "path": "\/baz\/0\/foo", "value": "world" } ' : OK +Testing 'Out of bounds (upper)', doc '{ "bar": 1, 2 }' patch ' { "op": "add", "path": "\/bar\/8", "value": "5" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'Out of bounds (lower)', doc '{ "bar": 1, 2 }' patch ' { "op": "add", "path": "\/bar\/-1", "value": "5" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing '(null)', doc '{ "foo": 1 }' patch ' { "op": "add", "path": "\/bar", "value": true } ' : OK +Testing '(null)', doc '{ "foo": 1 }' patch ' { "op": "add", "path": "\/bar", "value": false } ' : OK +Testing '(null)', doc '{ "foo": 1 }' patch ' { "op": "add", "path": "\/bar", "value": null } ' : OK +Testing '0 can be an array index or object element name', doc '{ "foo": 1 }' patch ' { "op": "add", "path": "\/0", "value": "bar" } ' : OK +Testing '(null)', doc ' "foo" ' patch ' { "op": "add", "path": "\/1", "value": "bar" } ' : OK +Testing '(null)', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/1", "value": "bar" } ' : OK +Testing '(null)', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/0", "value": "bar" } ' : OK +Testing 'push item to array via last index + 1', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/2", "value": "bar" } ' : OK +Testing 'add item to array at index > length should fail', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/3", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'test against implementation-specific numeric parsing', doc '{ "1e0": "foo" }' patch ' { "op": "test", "path": "\/1e0", "value": "foo" } ' : OK +Testing 'test with bad number should fail', doc ' "foo", "bar" ' patch ' { "op": "test", "path": "\/1e0", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid path field +Testing 'Object operation on array target', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/bar", "value": 42 } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'value in array add not flattened', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/1", "value": "bar", "baz" } ' : OK +Testing '(null)', doc '{ "foo": 1, "bar": 1, 2, 3, 4 }' patch ' { "op": "remove", "path": "\/bar" } ' : OK +Testing '(null)', doc '{ "foo": 1, "baz": { "qux": "hello" } }' patch ' { "op": "remove", "path": "\/baz\/0\/qux" } ' : OK +Testing '(null)', doc '{ "foo": 1, "baz": { "qux": "hello" } }' patch ' { "op": "replace", "path": "\/foo", "value": 1, 2, 3, 4 } ' : OK +Testing '(null)', doc '{ "foo": 1, 2, 3, 4 , "baz": { "qux": "hello" } }' patch ' { "op": "replace", "path": "\/baz\/0\/qux", "value": "world" } ' : OK +Testing '(null)', doc ' "foo" ' patch ' { "op": "replace", "path": "\/0", "value": "bar" } ' : OK +Testing '(null)', doc ' "" ' patch ' { "op": "replace", "path": "\/0", "value": 0 } ' : OK +Testing '(null)', doc ' "" ' patch ' { "op": "replace", "path": "\/0", "value": true } ' : OK +Testing '(null)', doc ' "" ' patch ' { "op": "replace", "path": "\/0", "value": false } ' : OK +Testing '(null)', doc ' "" ' patch ' { "op": "replace", "path": "\/0", "value": null } ' : OK +Testing 'value in array replace not flattened', doc ' "foo", "sil" ' patch ' { "op": "replace", "path": "\/1", "value": "bar", "baz" } ' : OK +Testing 'replace whole document', doc '{ "foo": "bar" }' patch ' { "op": "replace", "path": "", "value": { "baz": "qux" } } ' : OK +Testing 'add whole document, null', doc '{ }' patch ' { "op": "remove", "path": "" }, { "op": "add", "path": "", "value": { "baz": "qux" } } ' : OK +Testing 'replace whole document, null', doc '{ }' patch ' { "op": "remove", "path": "" }, { "op": "replace", "path": "", "value": { "baz": "qux" } } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 1: Invalid path field +Testing 'remove whole document', doc '{ "foo": "bar" }' patch ' { "op": "remove", "path": "" } ' : OK +Testing 'remove whole document', doc '{ "foo": "bar" }' patch ' { "op": "remove", "path": "" } ' : OK +Testing 'remove whole document, array', doc ' "foo", "bar" ' patch ' { "op": "remove", "path": "" } ' : OK +Testing 'remove whole document, string', doc 'foo' patch ' { "op": "remove", "path": "" } ' : OK +Testing 'remove whole document, null', doc '{ }' patch ' { "op": "remove", "path": "" }, { "op": "remove", "path": "" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 1: Invalid path field +Testing 'test replace with missing parent key should fail', doc '{ "bar": "baz" }' patch ' { "op": "replace", "path": "\/foo\/bar", "value": false } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by path field +Testing 'spurious patch properties', doc '{ "foo": 1 }' patch ' { "op": "test", "path": "\/foo", "value": 1, "spurious": 1 } ' : OK +Testing 'null value should be valid obj property', doc '{ "foo": null }' patch ' { "op": "test", "path": "\/foo", "value": null } ' : OK +Testing 'null value should be valid obj property to be replaced with something truthy', doc '{ "foo": null }' patch ' { "op": "replace", "path": "\/foo", "value": "truthy" } ' : OK +Testing 'null value should be valid obj property to be moved', doc '{ "foo": null }' patch ' { "op": "move", "from": "\/foo", "path": "\/bar" } ' : OK +Testing 'null value should be valid obj property to be copied', doc '{ "foo": null }' patch ' { "op": "copy", "from": "\/foo", "path": "\/bar" } ' : OK +Testing 'null value should be valid obj property to be removed', doc '{ "foo": null }' patch ' { "op": "remove", "path": "\/foo" } ' : OK +Testing 'null value should still be valid obj property replace other value', doc '{ "foo": "bar" }' patch ' { "op": "replace", "path": "\/foo", "value": null } ' : OK +Testing 'test should pass despite rearrangement', doc '{ "foo": { "foo": 1, "bar": 2 } }' patch ' { "op": "test", "path": "\/foo", "value": { "bar": 2, "foo": 1 } } ' : OK +Testing 'test should pass despite (nested) rearrangement', doc '{ "foo": { "foo": 1, "bar": 2 } }' patch ' { "op": "test", "path": "\/foo", "value": { "bar": 2, "foo": 1 } } ' : OK +Testing 'test should pass - no error', doc '{ "foo": { "bar": 1, 2, 5, 4 } }' patch ' { "op": "test", "path": "\/foo", "value": { "bar": 1, 2, 5, 4 } } ' : OK +Testing 'test op should fail', doc '{ "foo": { "bar": 1, 2, 5, 4 } }' patch ' { "op": "test", "path": "\/foo", "value": 1, 2 } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Value of element referenced by 'path' field did not match 'value' field +Testing 'Test the whole document', doc '{ "foo": 1 }' patch ' { "op": "test", "path": "", "value": { "foo": 1 } } ' : OK +Testing 'Test the whole document, no match', doc '{ "foo": 1 }' patch ' { "op": "test", "path": "", "value": { "foo": 2 } } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Value of element referenced by 'path' field did not match 'value' field +Testing 'Empty-string element', doc '{ "": 1 }' patch ' { "op": "test", "path": "\/", "value": 1 } ' : OK +Testing '(null)', doc '{ "foo": "bar", "baz" , "": 0, "a\/b": 1, "c%d": 2, "e^f": 3, "g|h": 4, "i\\j": 5, "k\"l": 6, " ": 7, "m~n": 8 }' patch ' { "op": "test", "path": "\/foo", "value": "bar", "baz" }, { "op": "test", "path": "\/foo\/0", "value": "bar" }, { "op": "test", "path": "\/", "value": 0 }, { "op": "test", "path": "\/a~1b", "value": 1 }, { "op": "test", "path": "\/c%d", "value": 2 }, { "op": "test", "path": "\/e^f", "value": 3 }, { "op": "test", "path": "\/g|h", "value": 4 }, { "op": "test", "path": "\/i\\j", "value": 5 }, { "op": "test", "path": "\/k\"l", "value": 6 }, { "op": "test", "path": "\/ ", "value": 7 }, { "op": "test", "path": "\/m~0n", "value": 8 } ' : OK +Testing 'Move to same location has no effect', doc '{ "foo": 1 }' patch ' { "op": "move", "from": "\/foo", "path": "\/foo" } ' : OK +Testing '(null)', doc '{ "foo": 1, "baz": { "qux": "hello" } }' patch ' { "op": "move", "from": "\/foo", "path": "\/bar" } ' : OK +Testing '(null)', doc '{ "baz": { "qux": "hello" } , "bar": 1 }' patch ' { "op": "move", "from": "\/baz\/0\/qux", "path": "\/baz\/1" } ' : OK +Testing '(null)', doc '{ "baz": { "qux": "hello" } , "bar": 1 }' patch ' { "op": "copy", "from": "\/baz\/0", "path": "\/boo" } ' : OK +Testing 'replacing the root of the document is possible with add', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "", "value": { "baz": "qux" } } ' : OK +Testing 'Adding to "/-" adds to the end of the array', doc ' 1, 2 ' patch ' { "op": "add", "path": "\/-", "value": { "foo": "bar", "baz" } } ' : OK +Testing 'Adding to "/-" adds to the end of the array, even n levels down', doc ' 1, 2, 3, 4, 5 ' patch ' { "op": "add", "path": "\/2\/1\/-", "value": { "foo": "bar", "baz" } } ' : OK +Testing 'test remove with bad number should fail', doc '{ "foo": 1, "baz": { "qux": "hello" } }' patch ' { "op": "remove", "path": "\/baz\/1e0\/qux" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid path field +Testing 'test remove on array', doc ' 1, 2, 3, 4 ' patch ' { "op": "remove", "path": "\/0" } ' : OK +Testing 'test repeated removes', doc ' 1, 2, 3, 4 ' patch ' { "op": "remove", "path": "\/1" }, { "op": "remove", "path": "\/2" } ' : OK +Testing 'test remove with bad index should fail', doc ' 1, 2, 3, 4 ' patch ' { "op": "remove", "path": "\/1e0" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid path field +Testing 'test replace with bad number should fail', doc ' "" ' patch ' { "op": "replace", "path": "\/1e0", "value": false } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid path field +Testing 'test copy with bad number should fail', doc '{ "baz": 1, 2, 3 , "bar": 1 }' patch ' { "op": "copy", "from": "\/baz\/1e0", "path": "\/boo" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid from field +Testing 'test move with bad number should fail', doc '{ "foo": 1, "baz": 1, 2, 3, 4 }' patch ' { "op": "move", "from": "\/baz\/1e0", "path": "\/foo" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid from field +Testing 'test add with bad number should fail', doc ' "foo", "sil" ' patch ' { "op": "add", "path": "\/1e0", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'missing 'path' parameter', doc '{ }' patch ' { "op": "add", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch object does not contain 'path' field +Testing ''path' parameter with null value', doc '{ }' patch ' { "op": "add", "path": null, "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'invalid JSON Pointer token', doc '{ }' patch ' { "op": "add", "path": "foo", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Failed to set value at path referenced by 'path' field +Testing 'missing 'value' parameter to add', doc ' 1 ' patch ' { "op": "add", "path": "\/-" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch object does not contain a 'value' field +Testing 'missing 'value' parameter to replace', doc ' 1 ' patch ' { "op": "replace", "path": "\/0" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch object does not contain a 'value' field +Testing 'missing 'value' parameter to test', doc ' null ' patch ' { "op": "test", "path": "\/0" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch object does not contain a 'value' field +Testing 'missing value parameter to test - where undef is falsy', doc ' false ' patch ' { "op": "test", "path": "\/0" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch object does not contain a 'value' field +Testing 'missing from parameter to copy', doc ' 1 ' patch ' { "op": "copy", "path": "\/-" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch does not contain a 'from' field +Testing 'missing from location to copy', doc '{ "foo": 1 }' patch ' { "op": "copy", "from": "\/bar", "path": "\/foo" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by from field +Testing 'missing from parameter to move', doc '{ "foo": 1 }' patch ' { "op": "move", "path": "" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch does not contain a 'from' field +Testing 'missing from location to move', doc '{ "foo": 1 }' patch ' { "op": "move", "from": "\/bar", "path": "\/foo" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by from field +Testing 'duplicate ops, json-c parses this as op:move', doc '{ "foo": "bar" }' patch ' { "op": "move", "path": "\/baz", "value": "qux", "from": "\/foo" } ' : OK +Testing 'unrecognized op should fail', doc '{ "foo": 1 }' patch ' { "op": "spam", "path": "\/foo", "value": 1 } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Patch object has invalid 'op' field +Testing 'test with bad array number that has leading zeros', doc ' "foo", "bar" ' patch ' { "op": "test", "path": "\/00", "value": "foo" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid path field +Testing 'test with bad array number that has leading zeros', doc ' "foo", "bar" ' patch ' { "op": "test", "path": "\/01", "value": "bar" } ' : OK + => json_patch_apply failed as expected: ERRNO=EINVAL at patch idx 0: Invalid path field +Testing 'Removing nonexistent field', doc '{ "foo": "bar" }' patch ' { "op": "remove", "path": "\/baz" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by path field +Testing 'Removing deep nonexistent path', doc '{ "foo": "bar" }' patch ' { "op": "remove", "path": "\/missing1\/missing2" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by path field +Testing 'Removing nonexistent index', doc ' "foo", "bar" ' patch ' { "op": "remove", "path": "\/2" } ' : OK + => json_patch_apply failed as expected: ERRNO=ENOENT at patch idx 0: Did not find element referenced by path field +Testing 'Patch with different capitalisation than doc', doc '{ "foo": "bar" }' patch ' { "op": "add", "path": "\/FOO", "value": "BAR" } ' : OK
View file
_service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_json_patch.test
Added
@@ -0,0 +1,17 @@ +#!/bin/sh + +export _JSON_C_STRERROR_ENABLE=1 + +# Common definitions +if test -z "$srcdir"; then + srcdir="${0%/*}" + test "$srcdir" = "$0" && srcdir=. + test -z "$srcdir" && srcdir=. +fi +. "$srcdir/test-defs.sh" + +filename=$(basename "$0") +filename="${filename%.*}" + +run_output_test $filename "$srcdir" +exit $?
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_json_pointer.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_json_pointer.c
Changed
@@ -269,6 +269,22 @@ printf("%s\n", json_object_get_string(jo1)); json_object_put(jo1); + + jo1 = json_tokener_parse("0, 1, 2, 3"); + jo2 = json_tokener_parse("0, 1, 2, 3, null, null, null, 7"); + + assert(0 == json_pointer_set(&jo1, "/7", json_object_new_int(7))); + assert(1 == json_object_equal(jo1, jo2)); + + json_object_put(jo1); + + jo1 = json_tokener_parse("0, 1, 2, 3"); + + assert(0 == json_pointer_setf(&jo1, json_object_new_int(7), "/%u", 7)); + assert(1 == json_object_equal(jo1, jo2)); + + json_object_put(jo1); + json_object_put(jo2); } static void test_wrong_inputs_set(void)
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_locale.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_locale.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stddef.h> #include <stdio.h> @@ -21,8 +24,6 @@ json_object *new_obj; #ifdef HAVE_SETLOCALE setlocale(LC_NUMERIC, "de_DE"); -#else - printf("No locale\n"); #endif char buf110, buf210;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_null.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_null.c
Changed
@@ -2,6 +2,9 @@ * Tests if binary strings are supported. */ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <stdio.h> #include <string.h>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_object_iterator.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_object_iterator.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "config.h" #include <stdio.h> #include <stdlib.h>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_parse.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_parse.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stddef.h> #include <stdio.h> @@ -35,13 +38,14 @@ static void single_incremental_parse(const char *test_string, int clear_serializer) { - int ii; + size_t ii; int chunksize = atoi(getenv("TEST_PARSE_CHUNKSIZE")); struct json_tokener *tok; enum json_tokener_error jerr; json_object *all_at_once_obj, *new_obj; const char *all_at_once_str, *new_str; + new_obj = NULL; assert(chunksize > 0); all_at_once_obj = json_tokener_parse(test_string); if (clear_serializer) @@ -49,7 +53,7 @@ all_at_once_str = json_object_to_json_string(all_at_once_obj); tok = json_tokener_new(); - int test_string_len = strlen(test_string) + 1; // Including '\0' ! + size_t test_string_len = strlen(test_string) + 1; // Including '\0' ! for (ii = 0; ii < test_string_len; ii += chunksize) { int len_to_parse = chunksize; @@ -92,7 +96,7 @@ if (getenv("TEST_PARSE_CHUNKSIZE") != NULL) single_incremental_parse(test_string, clear_serializer); } -static void test_basic_parse() +static void test_basic_parse(void) { single_basic_parse("\"\003\"", 0); single_basic_parse("/* hello */\"foo\"", 0); @@ -195,13 +199,13 @@ single_basic_parse("18446744073709551616", 1); } -static void test_utf8_parse() +static void test_utf8_parse(void) { // json_tokener_parse doesn't support checking for byte order marks. // It's the responsibility of the caller to detect and skip a BOM. // Both of these checks return null. - char *utf8_bom = "\xEF\xBB\xBF"; - char *utf8_bom_and_chars = "\xEF\xBB\xBF{}"; + const char *utf8_bom = "\xEF\xBB\xBF"; + const char *utf8_bom_and_chars = "\xEF\xBB\xBF{}"; single_basic_parse(utf8_bom, 0); single_basic_parse(utf8_bom_and_chars, 0); } @@ -222,7 +226,7 @@ return JSON_C_VISIT_RETURN_CONTINUE; } -static void test_verbose_parse() +static void test_verbose_parse(void) { json_object *new_obj; enum json_tokener_error error = json_tokener_success; @@ -256,24 +260,24 @@ } incremental_steps = { /* Check that full json messages can be parsed, both w/ and w/o a reset */ - {"{ \"foo\": 123 }", -1, -1, json_tokener_success, 0}, - {"{ \"foo\": 456 }", -1, -1, json_tokener_success, 1}, - {"{ \"foo\": 789 }", -1, -1, json_tokener_success, 1}, + {"{ \"foo\": 123 }", -1, -1, json_tokener_success, 0, 0}, + {"{ \"foo\": 456 }", -1, -1, json_tokener_success, 1, 0}, + {"{ \"foo\": 789 }", -1, -1, json_tokener_success, 1, 0}, /* Check the comment parse*/ - {"/* hello */{ \"foo\"", -1, -1, json_tokener_continue, 0}, - {"/* hello */:/* hello */", -1, -1, json_tokener_continue, 0}, - {"\"bar\"/* hello */", -1, -1, json_tokener_continue, 0}, - {"}/* hello */", -1, -1, json_tokener_success, 1}, - {"/ hello ", -1, 1, json_tokener_error_parse_comment, 1}, - {"/* hello\"foo\"", -1, -1, json_tokener_continue, 1}, - {"/* hello*\"foo\"", -1, -1, json_tokener_continue, 1}, - {"// hello\"foo\"", -1, -1, json_tokener_continue, 1}, + {"/* hello */{ \"foo\"", -1, -1, json_tokener_continue, 0, 0}, + {"/* hello */:/* hello */", -1, -1, json_tokener_continue, 0, 0}, + {"\"bar\"/* hello */", -1, -1, json_tokener_continue, 0, 0}, + {"}/* hello */", -1, -1, json_tokener_success, 1, 0}, + {"/ hello ", -1, 1, json_tokener_error_parse_comment, 1, 0}, + {"/* hello\"foo\"", -1, -1, json_tokener_continue, 1, 0}, + {"/* hello*\"foo\"", -1, -1, json_tokener_continue, 1, 0}, + {"// hello\"foo\"", -1, -1, json_tokener_continue, 1, 0}, /* Check a basic incremental parse */ - {"{ \"foo", -1, -1, json_tokener_continue, 0}, - {"\": {\"bar", -1, -1, json_tokener_continue, 0}, - {"\":13}}", -1, -1, json_tokener_success, 1}, + {"{ \"foo", -1, -1, json_tokener_continue, 0, 0}, + {"\": {\"bar", -1, -1, json_tokener_continue, 0, 0}, + {"\":13}}", -1, -1, json_tokener_success, 1, 0}, /* Check the UTF-16 surrogate pair handling in various ways. * Note: \ud843\udd1e is u+1D11E, Musical Symbol G Clef @@ -281,56 +285,56 @@ * PuTTY doesn't currently show this character. */ /* parse one char at every time */ - {"\"\\", -1, -1, json_tokener_continue, 0}, - {"u", -1, -1, json_tokener_continue, 0}, - {"d", -1, -1, json_tokener_continue, 0}, - {"8", -1, -1, json_tokener_continue, 0}, - {"3", -1, -1, json_tokener_continue, 0}, - {"4", -1, -1, json_tokener_continue, 0}, - {"\\", -1, -1, json_tokener_continue, 0}, - {"u", -1, -1, json_tokener_continue, 0}, - {"d", -1, -1, json_tokener_continue, 0}, - {"d", -1, -1, json_tokener_continue, 0}, - {"1", -1, -1, json_tokener_continue, 0}, - {"e\"", -1, -1, json_tokener_success, 1}, + {"\"\\", -1, -1, json_tokener_continue, 0, 0}, + {"u", -1, -1, json_tokener_continue, 0, 0}, + {"d", -1, -1, json_tokener_continue, 0, 0}, + {"8", -1, -1, json_tokener_continue, 0, 0}, + {"3", -1, -1, json_tokener_continue, 0, 0}, + {"4", -1, -1, json_tokener_continue, 0, 0}, + {"\\", -1, -1, json_tokener_continue, 0, 0}, + {"u", -1, -1, json_tokener_continue, 0, 0}, + {"d", -1, -1, json_tokener_continue, 0, 0}, + {"d", -1, -1, json_tokener_continue, 0, 0}, + {"1", -1, -1, json_tokener_continue, 0, 0}, + {"e\"", -1, -1, json_tokener_success, 1, 0}, /* parse two char at every time */ - {"\"\\u", -1, -1, json_tokener_continue, 0}, - {"d8", -1, -1, json_tokener_continue, 0}, - {"34", -1, -1, json_tokener_continue, 0}, - {"\\u", -1, -1, json_tokener_continue, 0}, - {"dd", -1, -1, json_tokener_continue, 0}, - {"1e\"", -1, -1, json_tokener_success, 1}, + {"\"\\u", -1, -1, json_tokener_continue, 0, 0}, + {"d8", -1, -1, json_tokener_continue, 0, 0}, + {"34", -1, -1, json_tokener_continue, 0, 0}, + {"\\u", -1, -1, json_tokener_continue, 0, 0}, + {"dd", -1, -1, json_tokener_continue, 0, 0}, + {"1e\"", -1, -1, json_tokener_success, 1, 0}, /* check the low surrogate pair */ - {"\"\\ud834", -1, -1, json_tokener_continue, 0}, - {"\\udd1e\"", -1, -1, json_tokener_success, 1}, - {"\"\\ud834\\", -1, -1, json_tokener_continue, 0}, - {"udd1e\"", -1, -1, json_tokener_success, 1}, - {"\"\\ud834\\u", -1, -1, json_tokener_continue, 0}, - {"dd1e\"", -1, -1, json_tokener_success, 1}, - {"\"fff \\ud834\\ud", -1, -1, json_tokener_continue, 0}, - {"d1e bar\"", -1, -1, json_tokener_success, 1}, - {"\"fff \\ud834\\udd", -1, -1, json_tokener_continue, 0}, - {"1e bar\"", -1, -1, json_tokener_success, 1}, + {"\"\\ud834", -1, -1, json_tokener_continue, 0, 0}, + {"\\udd1e\"", -1, -1, json_tokener_success, 1, 0}, + {"\"\\ud834\\", -1, -1, json_tokener_continue, 0, 0}, + {"udd1e\"", -1, -1, json_tokener_success, 1, 0}, + {"\"\\ud834\\u", -1, -1, json_tokener_continue, 0, 0}, + {"dd1e\"", -1, -1, json_tokener_success, 1, 0}, + {"\"fff \\ud834\\ud", -1, -1, json_tokener_continue, 0, 0}, + {"d1e bar\"", -1, -1, json_tokener_success, 1, 0}, + {"\"fff \\ud834\\udd", -1, -1, json_tokener_continue, 0, 0}, + {"1e bar\"", -1, -1, json_tokener_success, 1, 0}, /* \ud83d\ude00 is U+1F600, Grinning Face * Displays fine in PuTTY, though you may need "less -r" */ - {"\"fff \\ud83d\\ude", -1, -1, json_tokener_continue, 0}, - {"00 bar\"", -1, -1, json_tokener_success, 1}, + {"\"fff \\ud83d\\ude", -1, -1, json_tokener_continue, 0, 0}, + {"00 bar\"", -1, -1, json_tokener_success, 1, 0}, /* Check that json_tokener_reset actually resets */ - {"{ \"foo", -1, -1, json_tokener_continue, 1}, - {": \"bar\"}", -1, 0, json_tokener_error_parse_unexpected, 1}, + {"{ \"foo", -1, -1, json_tokener_continue, 1, 0}, + {": \"bar\"}", -1, 0, json_tokener_error_parse_unexpected, 1, 0}, /* Check incremental parsing with trailing characters */ - {"{ \"foo", -1, -1, json_tokener_continue, 0}, - {"\": {\"bar", -1, -1, json_tokener_continue, 0}, - {"\":13}}XXXX", 10, 6, json_tokener_success, 0}, - {"XXXX", 4, 0, json_tokener_error_parse_unexpected, 1}, + {"{ \"foo", -1, -1, json_tokener_continue, 0, 0}, + {"\": {\"bar", -1, -1, json_tokener_continue, 0, 0}, + {"\":13}}XXXX", 10, 6, json_tokener_success, 0, 0}, + {"XXXX", 4, 0, json_tokener_error_parse_unexpected, 1, 0}, /* Check that trailing characters can change w/o a reset */ - {"{\"x\": 123 }\"X\"", -1, 11, json_tokener_success, 0}, - {"\"Y\"", -1, -1, json_tokener_success, 1}, + {"{\"x\": 123 }\"X\"", -1, 11, json_tokener_success, 0, 0}, + {"\"Y\"", -1, -1, json_tokener_success, 1, 0}, /* Trailing characters should cause a failure in strict mode */
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_parse.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_parse.expected
Changed
@@ -210,6 +210,19 @@ json_tokener_parse_ex(tok, Infinity9999, 8) ... OK: got correct error: continue json_tokener_parse_ex(tok, 1234 , 5) ... OK: got object of type double: Infinity json_tokener_parse_ex(tok, 1234 , 5) ... OK: got object of type int: 1234 +json_tokener_parse_ex(tok, 9223372036854775807, 22) ... OK: got object of type array: 9223372036854775807 +json_tokener_parse_ex(tok, 9223372036854775808, 22) ... OK: got object of type array: 9223372036854775808 +json_tokener_parse_ex(tok, -9223372036854775808, 23) ... OK: got object of type array: -9223372036854775808 +json_tokener_parse_ex(tok, -9223372036854775809, 23) ... OK: got object of type array: -9223372036854775808 +json_tokener_parse_ex(tok, -9223372036854775809, 23) ... OK: got correct error: number expected +json_tokener_parse_ex(tok, 18446744073709551615, 23) ... OK: got object of type array: 18446744073709551615 +json_tokener_parse_ex(tok, 18446744073709551616, 23) ... OK: got object of type array: 18446744073709551615 +json_tokener_parse_ex(tok, 18446744073709551616, 23) ... OK: got correct error: number expected +json_tokener_parse_ex(tok, 18446744073709551616, 21) ... OK: got correct error: unexpected end of data +json_tokener_parse_ex(tok, 9223372036854775808.0, 24) ... OK: got object of type array: 9223372036854775808.0 +json_tokener_parse_ex(tok, -9223372036854775809.0, 25) ... OK: got object of type array: -9223372036854775809.0 +json_tokener_parse_ex(tok, 18446744073709551615.0, 25) ... OK: got object of type array: 18446744073709551615.0 +json_tokener_parse_ex(tok, 18446744073709551616.0, 25) ... OK: got object of type array: 18446744073709551616.0 json_tokener_parse_ex(tok, noodle , 7) ... OK: got correct error: null expected json_tokener_parse_ex(tok, naodle , 7) ... OK: got correct error: null expected json_tokener_parse_ex(tok, track , 6) ... OK: got correct error: boolean expected @@ -275,5 +288,5 @@ json_tokener_parse_ex(tok, "\ud0031À" , 10) ... OK: got correct error: invalid utf-8 string json_tokener_parse_ex(tok, 1111 , 5) ... OK: got correct error: invalid utf-8 string json_tokener_parse_ex(tok, {"1":1} , 8) ... OK: got correct error: invalid utf-8 string -End Incremental Tests OK=185 ERROR=0 +End Incremental Tests OK=198 ERROR=0 ==================================
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_parse_int64.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_parse_int64.c
Changed
@@ -1,4 +1,7 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <stdio.h> #include <string.h> @@ -31,7 +34,7 @@ * This always exits with a 0 exit value. The output should be compared * against previously saved expected output. */ -int main() +int main(int argc, char **argv) { char buf100;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_printbuf.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_printbuf.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <limits.h> #include <stddef.h> @@ -16,7 +19,7 @@ #define __func__ __FUNCTION__ #endif -static void test_basic_printbuf_memset() +static void test_basic_printbuf_memset(void) { struct printbuf *pb; @@ -29,7 +32,7 @@ printf("%s: end test\n", __func__); } -static void test_printbuf_memset_length() +static void test_printbuf_memset_length(void) { struct printbuf *pb;
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_set_serializer.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_set_serializer.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stdio.h> #include <string.h> @@ -73,7 +76,8 @@ my_sub_object = json_object_new_double(1.0); json_object_object_add(my_object, "double", my_sub_object); printf("Check that the custom serializer does not include nul byte:\n"); - json_object_set_serializer(my_sub_object, json_object_double_to_json_string, "%125.0f,", NULL); +#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) + json_object_set_serializer(my_sub_object, json_object_double_to_json_string, UNCONST("%125.0f"), NULL); printf("my_object.to_string(custom serializer)=%s\n", json_object_to_json_string_ext(my_object, JSON_C_TO_STRING_NOZERO));
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_set_serializer.expected -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_set_serializer.expected
Changed
@@ -9,4 +9,4 @@ Next line of output should be from the custom freeit function: freeit, value=123 Check that the custom serializer does not include nul byte: -my_object.to_string(custom serializer)={"double": 1.} +my_object.to_string(custom serializer)={"double": 1}
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_set_value.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_set_value.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stdio.h> #include <string.h> @@ -68,6 +71,14 @@ json_object_set_string(tmp, SHORT); assert(strcmp(json_object_get_string(tmp), SHORT) == 0); assert(strcmp(json_object_to_json_string(tmp), "\"" SHORT "\"") == 0); + + // Set an empty string a couple times to try to trigger + // a case that used to leak memory. + json_object_set_string(tmp, ""); + json_object_set_string(tmp, HUGE); + json_object_set_string(tmp, ""); + json_object_set_string(tmp, HUGE); + json_object_put(tmp); printf("STRING PASSED\n");
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_strerror.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_strerror.c
Changed
@@ -1,5 +1,7 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "strerror_override.h" -#include "strerror_override_private.h" #include <stdio.h>
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_util_file.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_util_file.c
Changed
@@ -1,5 +1,7 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include "strerror_override.h" -#include "strerror_override_private.h" #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <io.h> @@ -35,7 +37,7 @@ #define PATH_MAX 256 #endif -static void test_write_to_file() +static void test_write_to_file(void) { json_object *jso; @@ -90,7 +92,7 @@ static void stat_and_cat(const char *file) { struct stat sb; - int d = open(file, O_RDONLY, 0600); + int d = open(file, O_RDONLY); if (d < 0) { printf("FAIL: unable to open %s: %s\n", file, strerror(errno)); @@ -168,7 +170,7 @@ char filenamePATH_MAX; (void)snprintf(filename, sizeof(filename), "%s/valid.json", testdir); - int d = open(filename, O_RDONLY, 0); + int d = open(filename, O_RDONLY); if (d < 0) { fprintf(stderr, "FAIL: unable to open %s: %s\n", filename, strerror(errno)); @@ -193,7 +195,7 @@ char filenamePATH_MAX; (void)snprintf(filename, sizeof(filename), "%s/valid_nested.json", testdir); - int d = open(filename, O_RDONLY, 0); + int d = open(filename, O_RDONLY); if (d < 0) { fprintf(stderr, "FAIL: unable to open %s: %s\n", filename, strerror(errno)); @@ -231,7 +233,7 @@ close(d); } -static void test_read_nonexistant() +static void test_read_nonexistant(void) { const char *filename = "./not_present.json"; @@ -249,10 +251,10 @@ } } -static void test_read_closed() +static void test_read_closed(void) { // Test reading from a closed fd - int d = open("/dev/null", O_RDONLY, 0); + int d = open("/dev/null", O_RDONLY); if (d < 0) { puts("FAIL: unable to open"); @@ -287,7 +289,7 @@ json_object *jso = json_object_from_file(filename); - int d = open(filename, O_RDONLY, 0); + int d = open(filename, O_RDONLY); if (d < 0) { fprintf(stderr, "FAIL: unable to open %s: %s\n", filename, strerror(errno));
View file
_service:tar_scm:json-c-0.16-20220414.tar.gz/tests/test_visit.c -> _service:tar_scm:json-c-0.17-20230812.tar.gz/tests/test_visit.c
Changed
@@ -1,3 +1,6 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif #include <assert.h> #include <stddef.h> #include <stdio.h>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2