135 Commits

Author SHA1 Message Date
Eric Haszlakiewicz
2f2ddc1f2d Generate docs for the 0.16 release 2022-04-14 01:12:43 +00:00
Eric Haszlakiewicz
2c6358521a Bump version to 0.16 2022-04-14 01:10:39 +00:00
Eric Haszlakiewicz
7d303478a4 Update the ChangeLog with recent changes, in preparation for a 0.16 release.
Add a list of issues closed for this release.
2022-04-14 01:05:38 +00:00
Eric Haszlakiewicz
66dcdf549e Add new authors since the 0.15 release, tweak instructions for how to update that list. 2022-04-14 01:04:53 +00:00
Eric Hawicz
4902f9cb87 Merge pull request #765 from jvoisin/patch-1
Improve a bit the coverage of the fuzzer
2022-04-13 14:28:51 -04:00
Julien Voisin
558d48a6f3 Improve a bit the coverage of the fuzzer 2022-04-13 15:42:46 +02:00
Eric Haszlakiewicz
46b58ad9e7 Fix issue #764: adjust test_util_file to match new output (changed in 6e53347) 2022-04-08 22:58:24 +00:00
Eric Hawicz
0b937f6173 Merge pull request #758 from c3h2-ctf/context
Preserve context if out of memory
2022-04-04 18:01:39 -04:00
Eric Hawicz
65274cf3b5 Update issue templates 2022-04-04 17:10:31 -04:00
Tobias Stoeckmann
0c0d901443 Preserve context if out of memory
If memory allocation fails in json_c_set_serialization_double_format or
json_object_copy_serializer_data then return with an error value and
preserve previous values without overriding them with NULL.
2022-03-31 18:05:48 +02:00
Eric Haszlakiewicz
e244146dfd Remove single quote from #error line. Fixes issue #761 2022-03-25 01:12:07 +00:00
Eric Hawicz
a1c092bd7b Merge pull request #760 from BonsaiYi/error
Code style: removed unneeded double-quotes
2022-03-23 00:14:36 -04:00
BonsaY
716978f20d Code style removed unneeded double-quotes
this way, it complies with the other #error usages
2022-03-21 21:10:45 +01:00
Eric Hawicz
79459b2de2 Merge pull request #755 from c3h2-ctf/error
Fix error messages
2022-03-19 10:05:48 -04:00
Eric Hawicz
2326e34390 Merge pull request #754 from c3h2-ctf/doc
Minor improvements to documentation
2022-03-19 10:04:58 -04:00
Tobias Stoeckmann
6e533471a8 Fix error messages
Error messages did not reflect actual function names.
2022-03-19 10:59:43 +01:00
Tobias Stoeckmann
a7d85bfba9 Fix typos in comments
Spotted during code reviews.
2022-03-19 10:39:56 +01:00
Tobias Stoeckmann
cbc603b587 Adjusted URLs
Most of these sites support HTTPS (some forward to HTTPS when accessing
the HTTP versions). Use HTTPS directly if supported.

Some URLs led to 404 error pages. Adjusted the links to point to
new locations.

I did not adjust the Microsoft HTML Help Workshop link because it seems
that this software is not available anymore. Instead of removing the
link entirely I kept it there in case it helps someone to find the
software on archived websites.
2022-03-19 10:34:55 +01:00
Eric Hawicz
f0d93cee14 Merge pull request #748 from c3h2-ctf/printbuf
sprintbuf(): test for all vsnprintf error values
2022-03-07 00:06:57 -05:00
Eric Hawicz
9b832c8710 Merge pull request #752 from c3h2-ctf/typos
Fix typos
2022-03-06 23:33:42 -05:00
Tobias Stoeckmann
543a8eb5f9 Fix typos
Mostly found with codespell and during code review.
2022-03-06 16:07:36 +01:00
Tobias Stoeckmann
94b2a0cb29 sprintbuf(): test for all vsnprintf error values
The POSIX specification states that vsnprintf returns "a negative value"
in case of error, but the code checks explicitly only for -1.
2022-03-06 16:05:32 +01:00
Eric Hawicz
a4389f4f30 Merge pull request #749 from c3h2-ctf/sprintbuf
sprintbuf(): handle printbuf_memappend errors
2022-03-03 21:32:09 -05:00
Eric Hawicz
4493db76d6 Merge pull request #750 from c3h2-ctf/clearmem
printbuf_memset(): set gaps to zero
2022-03-03 21:29:27 -05:00
Eric Hawicz
1491d92038 Merge pull request #751 from c3h2-ctf/arguments
printbuf: do not allow invalid arguments
2022-03-03 21:26:22 -05:00
Tobias Stoeckmann
d07da04c14 sprintbuf(): handle printbuf_memappend errors
If errors occur in printbuf_memappend, then these errors should be
propagated through sprintbuf to indicate the error to the user.

Proof of Concept:
```
 #include <err.h>
 #include <limits.h>
 #include <stdio.h>

 #include "json.h"

 int
 main(void) {
  struct printbuf *pb;
  if ((pb = printbuf_new()) == NULL)
   err(1, "printbuf_new");
  if (printbuf_memset(pb, INT_MAX - 9, 'a', 1) < 0)
   errx(1, "printbuf_memset");
  printf("length: %d\n", printbuf_length(pb));
  printf("sprintbuf: %d\n", sprintbuf(pb, "string too long"));
  printf("length: %d\n", printbuf_length(pb));
  printbuf_free(pb);
  return 0;
 }
```

You can see that sprintbuf does not return an error but length is still
the same, i.e. the string "string too long" has not been appended.

I would like to add this as a unit test but it really depends on the
operating system if printbuf_memset() would fail if not enough memory is
available or not.
2022-03-03 21:24:27 +01:00
Tobias Stoeckmann
63c602ff80 printbuf_memset(): set gaps to zero
It is possible to have a printbuf with "gaps", i.e. areas within the
print buffer which have not been initialized by using printbuf_memset.

Always clear memory in such cases.

Example:
```
struct printbuf *pb = printbuf_new();
printbuf_memset(pb, 10, 'a', 2);
```
In this case pb->buf[0] is '\0' but pb->buf[1] up to pb->buf[9] are
not set. The length would be 12 due to successful printbuf_memset.
2022-03-03 21:18:53 +01:00
Tobias Stoeckmann
4355242477 printbuf: do not allow invalid arguments
If invalid arguments are passed to printbuf functions return -1 to
protect printbuf internals.
2022-03-03 21:15:19 +01:00
Eric Hawicz
bd56cc8bf7 Merge pull request #745 from c3h2-ctf/vasprintf
vasprintf(): avoid out of memory accesses
2022-02-27 08:34:21 -05:00
Eric Hawicz
723ac8cbb5 Merge pull request #746 from rouault/typo_fixes
Fix typos in code comments and ChangeLog
2022-02-26 23:45:15 -05:00
Even Rouault
3bb54f97e7 Fix typos in code comments and ChangeLog 2022-02-25 00:14:47 +01:00
Tobias Stoeckmann
5c72257220 vasprintf(): avoid out of memory accesses
Systems without vasprintf fall back to implementation in header file
vasprintf_compat.h. This version could run into heap overflow issues
with very long arguments or formats provoking a lot of output.

The vsnprintf function returns a negative value if more than INT_MAX
characters would be written since its int return type could not
handle this (and %n couldn't handle it either).

Before testing for a possible error value the additional char for
\0 is already added. A -1 error code would not be detected.

Increment only after implicitly casting to an unsigned value to avoid
signed integer overflow if INT_MAX has been returned.

Use va_copy to duplicate the original ap argument for multiple uses
on non-WIN32 systems. At least with glibc the test suite would fail
because the arguments are not reset after leaving the vsnprintf call.

Removed support for apparently very old glibc versions which do not
comply with vsnprintf standard descriptions. It breaks support for
modern ones which are not forced to return -1 in case of error. The
standard specifies merely "a negative value".

How to reproduce:

- Use a system without vasprintf
- Alternatively remove -D_GNU_SOURCE from CMakeLists.txt
- Compile and run:

  #include "json.h"
  int main(void) {
    struct printbuf *pb = printbuf_new();
    sprintbuf(pb, "prefix %2147483647s", "*");
    printbuf_free(pb);
    return 0;
  }
2022-02-24 23:06:57 +01:00
Eric Hawicz
66cce0a1d7 Merge pull request #739 from rouault/avoid_unsigned_integer_overflow
json_escape_str(): avoid harmless unsigned integer overflow
2022-02-18 20:21:18 -05:00
Eric Hawicz
b11f79c52c Merge pull request #741 from rouault/json_type_to_name_formatter
json_type_to_name(): use correct printf() formatter
2022-02-18 20:08:31 -05:00
Eric Hawicz
78246db72f Merge pull request #742 from rouault/json_object_copy_serializer_data_add_assertion
json_object_copy_serializer_data(): add assertion
2022-02-18 20:08:02 -05:00
Eric Hawicz
a1ea216878 Merge pull request #744 from Kizuna-Meraki/close-random
Close file on error path.
2022-02-18 20:07:33 -05:00
Kizuna-Meraki
d783ad76c7 Close file on error path.
The file was only be closed when there was no error and
was being left open when there was an error. By moving
the close(fd) statement out of the if-clause, the file
can be close regardless if there is an error or not.
After the file is closed, it can be checked for errors.
2022-02-17 21:27:01 +01:00
Even Rouault
f2c0df404b json_type_to_name(): use correct printf() formatter
Was detected by Coverity Scan when analyzing GDAL's code base which has
a copy of json-c
2022-01-31 00:27:41 +01:00
Even Rouault
82d9433813 json_object_copy_serializer_data(): add assertion
This makes Coverity Scan happier since it believes that the initial
check ``if (!src->_userdata && !src->_user_delete)`` could mean that
src->_user_data may be nullptr.
2022-01-16 20:50:58 +01:00
Even Rouault
296db618e9 json_escape_str(): avoid harmless unsigned integer overflow
Current behaviour is perfectly valid, since wrap-over upon overflow is
well defined behaviour for unsigned types, but it is nevertheless nice to be
able to build with -fsanitize=undefined,unsigned-integer-overflow

There is no significant effect on the generated assembly as can be seen
on the diff of objdump -d output on a optimized build (the compiler
just decided to switch the order of a comparison):

@@ -135,8 +135,8 @@
  1d0:	0f 84 70 ff ff ff    	je     146 <json_escape_str+0x146>
  1d6:	4c 3b 24 24          	cmp    (%rsp),%r12
  1da:	0f 85 2d ff ff ff    	jne    10d <json_escape_str+0x10d>
- 1e0:	49 39 f4             	cmp    %rsi,%r12
- 1e3:	0f 87 b7 00 00 00    	ja     2a0 <json_escape_str+0x2a0>
+ 1e0:	4c 39 e6             	cmp    %r12,%rsi
+ 1e3:	0f 82 b7 00 00 00    	jb     2a0 <json_escape_str+0x2a0>
  1e9:	48 8b 44 24 18       	mov    0x18(%rsp),%rax
  1ee:	64 48 33 04 25 28 00 	xor    %fs:0x28,%rax
  1f5:	00 00
2022-01-12 23:44:39 +01:00
Eric Hawicz
3b4f1e92ad Merge pull request #737 from tniessen/patch-1
Fix typo in README
2022-01-11 21:25:38 -05:00
Tobias Nießen
928fa96db7 Fix typo in README 2022-01-10 00:12:25 +01:00
Eric Haszlakiewicz
a5c2e11460 Cause the cmake include dirs to also have ${CMAKE_INSTALL_INCLUDEDIR}/json-c, so downstream packages that use cmake to link against json-c can choose whether to include headers as just e.g. #include <json_object.h>, if they care to do so.
Update the README to better explain this, and make a few other tweaks.
2021-12-22 02:52:37 +00:00
Eric Haszlakiewicz
2d2382d709 Add linkhash accessor functions (lh_table_head(), lh_entry_next(), etc...) to pave the way for making the lh_table and lh_entry structure opaque in the future.
Update the docs to mark all members of those structures deprecated, and
 suggest what to use instead.
2021-11-30 03:27:55 +00:00
Eric Haszlakiewicz
320548caf6 Drop the REFCOUNT_DEBUG code, it hasn't been used in ages. 2021-11-30 03:08:02 +00:00
Eric Hawicz
9a90b8477b Merge pull request #734 from json-c/newer-appveyor
Newer appveyor config for VS2022 etc...
Update the appveyor config to specify "image" instead of just "os", and build for VS2017, VS2019 and VS2022.
2021-11-29 13:40:41 -05:00
Eric Haszlakiewicz
1cb56e705f Put the most recent image first in appveyor builds. 2021-11-29 18:21:05 +00:00
Eric Haszlakiewicz
1763edaba3 Skip most "Release" builds. s/b_config/CONFIGURATION/ to fix artifact creation. 2021-11-29 18:18:48 +00:00
Eric Haszlakiewicz
a5fed59756 There doesn't seem to be a way to extend the appveyor build matrix for just one image, so instead list a whole bunch of excluded builds. 2021-11-27 02:55:29 +00:00
Eric Haszlakiewicz
0910e18bbd Use the newer appveyor images to build for VS2017 and VS2019. Trim the number of builds we do. 2021-11-27 02:29:26 +00:00
Eric Haszlakiewicz
f1fb9abf14 Note the need to also set CTEST_OUTPUT_ON_FAILURE to get test output 2021-11-26 22:49:42 +00:00
Eric Hawicz
42aa6f7257 Merge pull request #732 from DiracResearch/fix/static_include_dirs
Fix/static include dirs
2021-11-11 23:52:43 -05:00
Robert Bielik
286b4fdd27 Fix uninitialized value error for clang-8 msan 2021-11-11 10:23:05 +01:00
Robert Bielik
a66a6cc51b Fix for clang ub sanitizer 2021-11-11 09:51:18 +01:00
Robert Bielik
21f767f63f Add target include dirs for static library as well 2021-11-11 09:37:53 +01:00
Eric Hawicz
9b0fb2b33e Merge pull request #727 from jobol/propo2
Really use prefix JSON_C_OBJECT_ADD_
2021-10-22 19:06:11 -04:00
José Bollo
8bf3b45a29 Really use prefix JSON_C_OBJECT_ADD_*
This change introduces JSON_C_OBJECT_ADD_CONSTANT_KEY
as a replacement of JSON_C_OBJECT_KEY_IS_CONSTANT.

The description of json_object_object_add_ex tells to
look at the flags JSON_C_OBJECT_ADD_* but it is not
for JSON_C_OBJECT_KEY_IS_CONSTANT.

From the point of vue of a developper using json-c,
the function json_object_object_add_ex is mainly used,
not the hash facility, it seems more natural to provide
a regular naming of prefix JSON_C_OBJECT_ADD_CONSTANT_KEY.
2021-10-19 11:18:17 +02:00
Eric Hawicz
05c5d15075 Merge pull request #729 from DeX77/patch-1
* don't assume includedir
2021-10-17 14:23:28 -04:00
DeX77
d6d4b71d7d * don't assume includedir
This change syncs the public header include install location with what gets written into pkgconfig file.
2021-10-15 11:12:39 +02:00
Eric Hawicz
382f9462c2 Merge pull request #726 from leongross/fix/test-cmake3.1
fix cmake version for tests
2021-10-09 09:17:25 -04:00
Leon Gross
8be2ffdcd7 fix cmake version for tests 2021-10-06 15:29:33 +02:00
Eric Hawicz
4fc44f32df Merge pull request #722 from imaami/fix-json_tokener_new_ex-use-after-free
Fix use-after-free in json_tokener_new_ex()
2021-09-04 23:16:13 -04:00
Juuso Alasuutari
9361d8d3a8 Fix use-after-free in json_tokener_new_ex()
The failure path taken in the event of printbuf_new() returning NULL
calls free() on tok->stack after already having freed tok. Swap the
order of the two calls to fix an obvious memory access violation.

Fixes: bcb6d7d347 ("Handle allocation failure in json_tokener_new_ex")
Signed-off-by: Juuso Alasuutari <juuso.alasuutari@gmail.com>
2021-09-04 20:14:30 +03:00
Eric Hawicz
dc1ef7d566 Merge pull request #718 from Pawday/master
CMake create uninstall target if unix generator is used
2021-07-31 22:46:01 -04:00
Pawday
e91e4cc9fb Setted cmake "uninstall" target to exist in unix like operating systems only 2021-07-26 18:52:29 +03:00
Eric Haszlakiewicz
f61f1a7a91 Add workaround for Visual Studio not knowing about "inline". 2021-07-25 20:31:59 +00:00
Eric Haszlakiewicz
db6a6cc2b2 Switch the Travis build to use osx_image: xcode12.5, in an attempt to avoid timeouts with Homebrew. 2021-07-25 20:03:55 +00:00
Eric Haszlakiewicz
6a0df2609e Merge some old work to include (some of) PR #464 into the current master branch. 2021-07-25 19:07:06 +00:00
Eric Haszlakiewicz
8c727e5ce1 Only define an "uninstall" target if it's not already defined (e.g. by projects that include json-c) 2021-07-25 15:11:11 +00:00
Eric Hawicz
be9671e48a Merge pull request #714 from Hex052/clang-format_AfterCaseLabel
Add AfterCaseLabel to .clang-format
2021-07-05 18:18:06 -04:00
Hex052
9dde931a1c Add AfterCaseLabel to .clang-format
This is to fix the behavior that might've changed between older versions of clang-format, I'm not sure.
Version 10 tries to put the bracket on the same line as case without this.
2021-07-04 18:28:21 -08:00
Eric Haszlakiewicz
75bf657cc2 If inttypes.h is present, use it, even on Windows. 2021-06-13 21:12:22 +00:00
Eric Haszlakiewicz
9ca50cf2f8 Issue #709: adjust some include guards to be a bit more json-c specific. 2021-06-02 23:53:23 +00:00
Eric Hawicz
0b7e78c309 Merge pull request #706 from davidjmccann/master
Check __STDC_VERSION__ is defined before checking its value
2021-05-15 08:41:24 -04:00
David McCann
00098efc96 Merge branch 'json-c:master' into master 2021-05-13 06:34:10 +01:00
David McCann
9b53c92ea3 Check __STDC_VERSION__ is defined before checking its value
Prevent an undef warning regarding __STDC_VERSION__ by checking whether it is defined before checking its value.
2021-05-13 06:31:18 +01:00
Eric Hawicz
cd7109f767 Merge pull request #696 from ssrlive/master
To avoid target exe file export JSON functions.
2021-05-01 15:21:31 -04:00
Eric Hawicz
78e390a261 Merge pull request #701 from commodo/configurable-opts
[RFC] json_pointer: allow the feature to be disabled
2021-04-17 17:26:49 -04:00
Alexandru Ardelean
8abeebc9b2 json_pointer: allow the feature to be disabled
Some users may not want to included it in their build/system. So allow a
cmake symbol to disable it.

A user can do 'cmake -DDISABLE_JSON_POINTER=ON <json_c_root_dir>' and
disable the json_pointer functionality. That saves about 17 KB (on an
x86_64) machine. This may be useful on smaller embedded systems; even
though the saving would be fewer kilobytes.

One thing that also needs to change a bit, is that the 'json.h' be
autogenerated via cmake, in order to conditionally include that
"json_pointer.h" file.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2021-04-16 11:49:38 +03:00
Alexandru Ardelean
1f8b64f62c tests: CMakeLists.txt: move test names to variable
The intent is to be able to disable some features that get built into the
library. When we do that, we also need to disable some tests.

It's easier when adjusting a variable that contains the list of test names,
versus modifying the list in the foreach() statement.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2021-04-16 09:32:17 +03:00
Eric Hawicz
94909840be Merge pull request #700 from Philosoph228/werror-fix
Fix unused variable for Win32 build in random_seed.c
2021-04-14 22:38:36 -04:00
Philosoph228
9c0565100a random_seed: fix unused variable for win32 build 2021-04-13 11:47:01 +05:00
ssrlive
ba181548bc To avoid target exe file export JSON functions. 2021-03-02 14:27:40 +08:00
Eric Haszlakiewicz
041cef434a Add a DISABLE_EXTRA_LIBS option to skip using libbsd, per @neheb's request on issue #692/commit 0f61f692. 2021-02-15 20:19:56 +00:00
Eric Haszlakiewicz
f787810890 If arc4random is used, don't bother compiling in the other fallback methods since they'll never be used. Fixes PR#695 about unreachable code too. 2021-02-13 03:23:58 +00:00
Eric Hawicz
7c859c54e4 Merge pull request #694 from ihsinme/patch-1
fix invalid unsigned arithmetic.
2021-02-06 17:25:24 -05:00
ihsinme
c456963110 Update json_object.c 2021-02-05 18:58:20 +03:00
Eric Haszlakiewicz
0f61f6921b Iesue #692: use arc4random() if it's available (in libc on BSD systems, and libbsd on Linux). 2021-01-13 01:57:25 +00:00
Eric Haszlakiewicz
69d650528d Keep the doc directory in the nodoc release tarball, just exclude its contents. 2021-01-13 01:30:16 +00:00
Eric Hawicz
4754f47434 Merge pull request #674 from ploxiln/random_seed_err_continue
random_seed: on error, continue to next method
2021-01-12 20:22:54 -05:00
Eric Hawicz
1fcb9e476b Merge pull request #689 from neheb/patch-1
fix compilation with clang
2020-12-18 21:30:14 -05:00
Rosen Penev
987d3b2c86 fix compilation with clang
Fixes the following warning:

json_pointer.c:230:7: warning: implicit declaration of function
    'vasprintf' is invalid in C99 [-Wimplicit-function-declaration]
            rc = vasprintf(&path_copy, path_fmt, args);
2020-12-17 19:59:37 -08:00
Pierce Lopez
0fd3b7d316 random_seed: on error, continue to next method
instead of exiting the process
2020-10-07 01:22:30 -04:00
Eric Hawicz
df27756491 Merge pull request #667 from stoeckmann/regression
Fixed test1 regression.
2020-09-11 20:56:51 -04:00
Tobias Stoeckmann
7af593c140 Fixed test1 regression.
SIZEOF_SIZE_T might be only defined in config.h.

Include config.h for these systems to pass tests which are only
supposed to be run on 32 bit systems.

Fixes issue #666.
2020-09-11 21:09:40 +02:00
Eric Hawicz
785a94b7a2 Merge pull request #665 from stoeckmann/tokener
Handle more allocation failures in json_tokener* functions
2020-08-24 09:51:41 -04:00
Eric Hawicz
eb08a92218 Merge pull request #660 from stoeckmann/arraylist
Validate size arguments in arraylist functions.
2020-08-24 09:51:18 -04:00
Tobias Stoeckmann
369e8477d2 Validate size arguments in arraylist functions.
The array_list_new2 function, which is externally reachable through
json_object_new_array_ext, does not check if specified initial size
actually fits into memory on 32 bit architectures.

It also allows negative values, which could lead to an overflow on these
architectures as well. I have added test cases for these situations.

While at it, also protect array_list_shrink against too large
empty_slots argument. No test added because it takes a huge length
value, therefore a lot of items within the array, to overflow the
calculation. In theory this affects 64 bit sytems as well, but since the
arraylist API is not supposed to be used by external applications
according to its header file, the call is protected due to int
limitation of json_object_array_shrink.
2020-08-24 12:13:50 +02:00
Eric Hawicz
b4e72c2655 Merge pull request #664 from stoeckmann/string
Limit strings at INT_MAX length
2020-08-23 16:43:31 -04:00
Eric Hawicz
f941931804 Merge pull request #663 from stoeckmann/strerror
Properly format errnos in _json_c_strerror
2020-08-23 16:38:21 -04:00
Eric Hawicz
1bc7a6b223 Merge pull request #662 from stoeckmann/random
Prevent signed overflow in get_time_seed
2020-08-23 16:34:40 -04:00
Tobias Stoeckmann
df62119b7f Prevent signed overflow in get_time_seed
Casting time(2) return value to int and multiplying the result with
such a constant will definitely lead to a signed overflow by this day.

Since signed overflows are undefined behaviour in C, avoid this.

Casting to unsigned is more than enough since the upper bits of a
64 bit time_t value will be removed with the int conversion anyway.
2020-08-22 13:25:21 +02:00
Tobias Stoeckmann
bcb6d7d347 Handle allocation failure in json_tokener_new_ex
The allocation of printbuf_new might fail. Return NULL to indicate tis
error to the caller. Otherwise later usage of the returned tokener would
lead to null pointer dereference.
2020-08-22 13:18:10 +02:00
Tobias Stoeckmann
e50154f615 Cap string length at INT_MAX.
Several issues occur if a string is longer than INT_MAX:

- The function json_object_get_string_len returns the length of a string
  as int. If the string is longer than INT_MAX, the result would be
  negative.
- That in turn would lead to possible out of boundary access when
  comparing these strings with memcmp and the returned length as done in
  json_object_equal.
- If json_escape_str is called with such strings, out of boundary
  accesses can occur due to internal int handling (also fixed).
- The string cannot be printed out due to printbuffer limits at
  INT_MAX (which is still true after this commit).

Such huge strings can only be inserted through API calls at this point
because input files are capped at INT_MAX anyway.

Due to huge amount of RAM needed to reproduce these issues I have not
added test cases.
2020-08-22 13:16:36 +02:00
Tobias Stoeckmann
583911a66c Aligned comment in _json_object_new_string
The comment only aligns correctly if tab size is 4. Replaced
spaces with tabs to stay in sync with style of other lines.
2020-08-22 13:07:45 +02:00
Tobias Stoeckmann
4298431150 Properly format errnos in _json_c_strerror
The function _json_c_strerror does not properly format unknown errnos.
The int to ascii loop ignores the leading digit if the number can be
divided by 10 and if an errno has been formatted, shorter errnos would
not properly terminate the newly created string, showing the ending
numbers of the previous output.

A test case has been added to show these effects.

Since this function has been introduced for tests, the effect of this on
real life code is basically non-existing. First an environment variable
has to be set to activate this strerror code and second an unknown errno
would have to be encountered.
2020-08-22 11:35:50 +02:00
Eric Haszlakiewicz
2b439ea598 Fix json_object_get_boolean() doc for the object and array cases (always returns 0), and add those cases to the test_cast test.
See also issue #658.
2020-08-17 14:57:21 +00:00
Eric Hawicz
cf30cba4ac Merge pull request #657 from stoeckmann/getrandom
Use GRND_NONBLOCK with getrandom.
2020-08-15 15:01:41 -04:00
Tobias Stoeckmann
f052e42f56 Use GRND_NONBLOCK with getrandom.
The json-c library is used in cryptsetup for LUKS2 header information.
Since cryptsetup can be called very early during boot, the developers
avoid getrandom() calls in their own code base for now. [1]

Introducing a blocking getrandom() call in json-c therefore introduces
this issue for cryptsetup as well. Even though cryptsetup issues do not
have to be json-c issues, here is my proposal:

Let's use a non-blocking call, falling back to other sources if the call
would block. Since getrandom() accesses urandom, it must mean that we
are in an early boot phase -- otherwise the call would not block
according to its manual page.

As stated in manual page of random(4), accessing /dev/urandom won't
block but return weak random numbers, therefore this fallback would work
for json-c.

While at it, fixed the debug message.

[1] https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/47
    which references to https://lwn.net/Articles/800509/
2020-08-15 15:52:17 +02:00
Eric Hawicz
104b408ee8 Merge pull request #656 from pogaram/fix-warnings
Fixed warnings
2020-08-14 16:57:32 -04:00
Aram Poghosyan
0ffb384409 Fixed warnings 2020-08-14 11:45:33 +04:00
Eric Hawicz
98b7ee93fd Merge pull request #655 from MarcT512/issue654
json_parse: Fix read past end of buffer
2020-08-07 10:18:30 -04:00
Marc
4e9e44e525 Fix read past end of buffer
Resolves https://github.com/json-c/json-c/issues/654
2020-08-07 10:49:45 +01:00
Eric Haszlakiewicz
8c7849e6e3 Eliminate use of ctype.h and replace isdigit() and tolower() with non-locale-sensitive approaches. 2020-08-02 04:06:44 +00:00
Eric Haszlakiewicz
f3d8006d34 Neither vertical tab nor formfeed are considered whitespace per the JSON spec, remove them from is_ws_char(). 2020-08-02 03:59:56 +00:00
Eric Haszlakiewicz
8b43ff0c22 Merge the is_ws_char() and is_hex_char() changes to json_tokener from branch 'ramiropolla/for_upstream' (PR #464) 2020-08-02 02:55:45 +00:00
Eric Haszlakiewicz
bfec9c8685 Take a hint from PR #464 and use json_object_new_string_len() to avoid a needless extra strlen() call.
Also, create a _json_object_get_string_len() for internal use when we know
for sure the object we're dealing with is a json_type_string.
2020-08-02 02:23:01 +00:00
Eric Hawicz
56a89f902f Merge pull request #653 from lamby/966657-json-c-please-make-the-build-reproducible
Make the documentation build reproducibly
2020-08-01 22:06:38 -04:00
Chris Lamb
46eea84554 Make the documentation build reproducibly
Whilst working on the Reproducible Builds effort [0] I noticed that
json-c could not be built reproducibly.

This is because it used the full, absolute path name as an (sanitised)
input to a filename, resulting in some binary package containing, for
example:

  /usr/share/doc/libjson-c-dev/html/md__build_1st_json-c-0_815_issues_closed_for_0_813.html
                                        ^^^^^^^^^^^^^^^^^^^^^^
or

  /usr/share/doc/libjson-c-dev/html/md__build_2_json-c-0_815_2nd_issues_closed_for_0_813.html
                                        ^^^^^^^^^^^^^^^^^^^^^^^^

These differing values are based on the path in which json-c is built. This was
originally filed in Debian as #966657 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/966657
2020-08-01 11:26:55 +01:00
Eric Hawicz
88cce7b9c5 Merge pull request #651 from alanc/getrandom
Getrandom
2020-07-31 20:30:11 -04:00
Alan Coopersmith
6cf4847796 Use getrandom() if available in json_c_get_random_seed
Lower overhead than opening & reading from /dev/urandom, and works
in chroots and other situtations where /dev/urandom is not available.
Falls back to existing methods when kernel doesn't support the syscall.
2020-07-31 08:28:07 -07:00
Eric Haszlakiewicz
002411293d Issue #649: Drop the generated doc/Doxyfile when creating a release. 2020-07-28 03:52:22 +00:00
Eric Hawicz
66f8ca3c03 Merge pull request #650 from sartura/readme-update
README: fix spelling errors
2020-07-27 10:31:05 -04:00
Jakov Smolic
55bf2d365d README: fix spelling errors
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
2020-07-27 15:05:55 +02:00
Eric Haszlakiewicz
47189b5ff1 Include updating the json-c-current-releaes gh-pages symlink as part of the release process. 2020-07-26 15:51:07 +00:00
Eric Haszlakiewicz
de02d09c32 Update the master branch to version 0.15.99 2020-07-26 15:26:53 +00:00
Eric Haszlakiewicz
870965e1ea Update AUTHORS, add issues_closed_for_0.15.md, tweak the release checklist slightly. 2020-07-24 03:17:13 +00:00
Ramiro Polla
38a112380b json_object: cleanup of *set_string* functions
This commit also has the side-effect that errno is set on failed calls
to json_object_set_string(_len).
2018-12-21 00:30:26 +01:00
Ramiro Polla
906188e1cf json_object: speed up creation of objects
Instead of using calloc(), call malloc() and initialize the relevant
fields individually.

speedup for 32-bit: ~15%
speedup for 64-bit: ~ 5%
2018-12-21 00:30:26 +01:00
Ramiro Polla
c9a0ac5886 json_tokener: optimize parsing of integer values
speedup for 32-bit: ~8%
speedup for 64-bit: ~9%
2018-12-21 00:30:21 +01:00
Ramiro Polla
d98fc501fb json_tokener: optimize check for number characters
speedup for 32-bit: ~5%
speedup for 64-bit: ~3%
2018-12-21 00:24:17 +01:00
Ramiro Polla
45c601bfa4 json_tokener: optimize check for hex characters
speedup for 32-bit: ~1%
speedup for 64-bit: ~1%
2018-12-21 00:24:17 +01:00
Ramiro Polla
158c248d5c json_tokener: optimize check for whitespace characters
speedup for 32-bit: ~15%
speedup for 64-bit: ~ 2%
2018-12-21 00:24:17 +01:00
Ramiro Polla
ab3e40b37c json_object_deep_copy: fix deep copy of strings containing '\0' 2018-12-20 22:26:06 +01:00
Ramiro Polla
1f46d2f40f json_object_private: remove _delete field
This field is set based on o_type when the object is created and it is
not changed during the lifetime of the object. Therefore we can check
o_type to choose the proper delete function in json_object_put(), and
save sizeof(void *) bytes in struct json_object_private.
2018-12-20 22:26:06 +01:00
100 changed files with 2092 additions and 3119 deletions

View File

@@ -23,6 +23,8 @@ AllowShortFunctionsOnASingleLine: Empty
BreakBeforeBraces: Custom BreakBeforeBraces: Custom
# Control of individual brace wrapping cases. # Control of individual brace wrapping cases.
BraceWrapping: BraceWrapping:
# Wrap brackets inside of a case
AfterCaseLabel: true
# Wrap class definition. # Wrap class definition.
AfterClass: true AfterClass: true
# Wrap control statements # Wrap control statements

View File

@@ -1,5 +1,5 @@
# EditorConfig # EditorConfig
# http://EditorConfig.org # https://EditorConfig.org
# top-most EditorConfig file # top-most EditorConfig file
root = true root = true

View File

@@ -8,7 +8,7 @@ assignees: ''
--- ---
Note: for general questions and comments, please use the forums at: Note: for general questions and comments, please use the forums at:
https://groups.google.com/forum/#!forum/json-c https://groups.google.com/g/json-c
**Describe the bug** **Describe the bug**
A clear and concise description of what the bug is, and any information about where you're running into the bug that you feel might be relevant. A clear and concise description of what the bug is, and any information about where you're running into the bug that you feel might be relevant.

1
.gitignore vendored
View File

@@ -70,6 +70,7 @@
# It's not good practice to build directly in the source tree # It's not good practice to build directly in the source tree
# but ignore cmake auto-generated files anyway: # but ignore cmake auto-generated files anyway:
/json_config.h /json_config.h
/json.h
/config.h /config.h
/json-c.pc /json-c.pc
/Makefile /Makefile

View File

@@ -79,7 +79,7 @@ matrix:
osx_image: xcode9.4 osx_image: xcode9.4
env: XCODE="true" env: XCODE="true"
- os: osx - os: osx
osx_image: xcode10.1 osx_image: xcode12.5
env: XCODE="true" CHECK="true" env: XCODE="true" CHECK="true"
# run coveralls # run coveralls

31
AUTHORS
View File

@@ -1,30 +1,61 @@
Alan Coopersmith <alan.coopersmith@oracle.com>
Alexander Dahl <post@lespocky.de> Alexander Dahl <post@lespocky.de>
Alexandru Ardelean <ardeleanalex@gmail.com>
andy5995 <andy400-dev@yahoo.com> andy5995 <andy400-dev@yahoo.com>
Aram Poghosyan <Aram.Poghosyan@teamviewer.com>
Björn Esser <besser82@fedoraproject.org> Björn Esser <besser82@fedoraproject.org>
BonsaY <bonsay@posteo.de>
changyong guo <guo1487@163.com> changyong guo <guo1487@163.com>
chenguoping <chenguopingdota@163.com> chenguoping <chenguopingdota@163.com>
Chris Lamb <lamby@debian.org>
Christopher Head <chead@chead.ca> Christopher Head <chead@chead.ca>
Chris Wolfe <chriswwolfe@gmail.com> Chris Wolfe <chriswwolfe@gmail.com>
C. Watford (christopher.watford@gmail.com) C. Watford (christopher.watford@gmail.com)
Darjan Krijan <darjan_krijan@gmx.de> Darjan Krijan <darjan_krijan@gmx.de>
David McCann <mccannd@uk.ibm.com>
DeX77 <dex@dragonslave.de>
dota17 <chenguopingdota@163.com>
Eric Haszlakiewicz <erh+git@nimenees.com>
Eric Hawicz <erh+git@nimenees.com> Eric Hawicz <erh+git@nimenees.com>
Even Rouault <even.rouault@spatialys.com>
Gianluigi Tiesi <sherpya@netfarm.it>
grdowns <grdowns@microsoft.com> grdowns <grdowns@microsoft.com>
Hex052 <elijahiff@gmail.com>
hofnarr <hofnarr@hofnarr.fi>
ihsinme <61293369+ihsinme@users.noreply.github.com>
Ivan Romanov <drizt@land.ru> Ivan Romanov <drizt@land.ru>
Jaap Keuter <jaap.keuter@xs4all.nl> Jaap Keuter <jaap.keuter@xs4all.nl>
Jakov Smolic <jakov.smolic@sartura.hr>
janczer <menshikov.ivn@gmail.com> janczer <menshikov.ivn@gmail.com>
Jehan <jehan@girinstud.io> Jehan <jehan@girinstud.io>
Jehiah Czebotar <jehiah@gmail.com> Jehiah Czebotar <jehiah@gmail.com>
Jonathan Wiens <j.wiens@teles.com> Jonathan Wiens <j.wiens@teles.com>
Jose Bollo <jose.bollo@iot.bzh> Jose Bollo <jose.bollo@iot.bzh>
José Bollo <jose.bollo@iot.bzh>
Juuso Alasuutari <juuso.alasuutari@gmail.com>
Keith Holman <keith.holman@windriver.com> Keith Holman <keith.holman@windriver.com>
Kizuna-Meraki <z9@kizunameraki.de>
Leon Gross <leon.gross@rub.de>
Liang, Gao <liang.gao@intel.com> Liang, Gao <liang.gao@intel.com>
Marc <34656315+MarcT512@users.noreply.github.com>
max <mpano91@gmail.com> max <mpano91@gmail.com>
Micah Snyder <micasnyd@cisco.com>
Michael Clark <michael@metaparadigm.com> Michael Clark <michael@metaparadigm.com>
myd7349 <myd7349@gmail.com> myd7349 <myd7349@gmail.com>
Pascal Cuoq <cuoq@trust-in-soft.com>
Pawday <pawday@mail.ru>
Philosoph228 <philosoph228@gmail.com>
Pierce Lopez <pierce.lopez@gmail.com> Pierce Lopez <pierce.lopez@gmail.com>
Po-Chuan Hsieh <sunpoet@sunpoet.net> Po-Chuan Hsieh <sunpoet@sunpoet.net>
Ramiro Polla <ramiro.polla@gmail.com> Ramiro Polla <ramiro.polla@gmail.com>
Rikard Falkeborn <rikard.falkeborn@gmail.com> Rikard Falkeborn <rikard.falkeborn@gmail.com>
Robert Bielik <robert.bielik@dirac.com>
Robert <roby_p97@yahoo.com> Robert <roby_p97@yahoo.com>
Rosen Penev <rosenp@gmail.com>
Rubasri Kalidas <rubasri.kalidas@intel.com> Rubasri Kalidas <rubasri.kalidas@intel.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> Unmanned Player <36690541+unmanned-player@users.noreply.github.com>

View File

@@ -10,11 +10,11 @@ endif()
if (CMAKE_VERSION VERSION_LESS 3.0) if (CMAKE_VERSION VERSION_LESS 3.0)
project(json-c) project(json-c)
set(PROJECT_VERSION_MAJOR "0") set(PROJECT_VERSION_MAJOR "0")
set(PROJECT_VERSION_MINOR "15") set(PROJECT_VERSION_MINOR "16")
set(PROJECT_VERSION_PATCH "0") set(PROJECT_VERSION_PATCH "0")
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
else() else()
project(json-c LANGUAGES C VERSION 0.15) project(json-c LANGUAGES C VERSION 0.16)
endif() endif()
# If we've got 3.0 then it's good, let's provide support. Otherwise, leave it be. # If we've got 3.0 then it's good, let's provide support. Otherwise, leave it be.
@@ -79,6 +79,10 @@ include(CMakePackageConfigHelpers)
option(BUILD_SHARED_LIBS "Default to building shared libraries" ON) option(BUILD_SHARED_LIBS "Default to building shared libraries" ON)
option(BUILD_STATIC_LIBS "Default to building static libraries" ON) option(BUILD_STATIC_LIBS "Default to building static libraries" ON)
if (BUILD_SHARED_LIBS)
add_definitions(-D JSON_C_DLL)
endif()
# Generate a release merge and test it to verify the correctness of republishing the package. # Generate a release merge and test it to verify the correctness of republishing the package.
ADD_CUSTOM_TARGET(distcheck ADD_CUSTOM_TARGET(distcheck
COMMAND make package_source COMMAND make package_source
@@ -97,6 +101,8 @@ option(DISABLE_WERROR "Avoid treating compiler warnings as fatal
option(ENABLE_RDRAND "Enable RDRAND Hardware RNG Hash Seed." OFF) option(ENABLE_RDRAND "Enable RDRAND Hardware RNG Hash Seed." OFF)
option(ENABLE_THREADING "Enable partial threading support." OFF) option(ENABLE_THREADING "Enable partial threading support." OFF)
option(OVERRIDE_GET_RANDOM_SEED "Override json_c_get_random_seed() with custom code." 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)
if (UNIX OR MINGW OR CYGWIN) if (UNIX OR MINGW OR CYGWIN)
@@ -144,10 +150,14 @@ check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdlib.h HAVE_STDLIB_H) check_include_file(stdlib.h HAVE_STDLIB_H)
check_include_file(sys/cdefs.h HAVE_SYS_CDEFS_H) check_include_file(sys/cdefs.h HAVE_SYS_CDEFS_H)
check_include_file(sys/param.h HAVE_SYS_PARAM_H) check_include_file(sys/param.h HAVE_SYS_PARAM_H)
check_include_file(sys/random.h HAVE_SYS_RANDOM_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(xlocale.h HAVE_XLOCALE_H) check_include_file(xlocale.h HAVE_XLOCALE_H)
if (HAVE_INTTYPES_H AND NOT MSVC) 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() endif()
@@ -169,6 +179,17 @@ check_symbol_exists(vasprintf "stdio.h" HAVE_VASPRINTF)
check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF) check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
check_symbol_exists(vprintf "stdio.h" HAVE_VPRINTF) check_symbol_exists(vprintf "stdio.h" HAVE_VPRINTF)
check_symbol_exists(arc4random "stdlib.h" HAVE_ARC4RANDOM)
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)
unset(HAVE_ARC4RANDOM CACHE)
check_symbol_exists(arc4random "bsd/stdlib.h" HAVE_ARC4RANDOM)
endif()
endif()
if (HAVE_FCNTL_H) if (HAVE_FCNTL_H)
check_symbol_exists(open "fcntl.h" HAVE_OPEN) check_symbol_exists(open "fcntl.h" HAVE_OPEN)
endif() endif()
@@ -190,6 +211,9 @@ endif()
if (HAVE_SYSLOG_H) if (HAVE_SYSLOG_H)
check_symbol_exists(vsyslog "syslog.h" HAVE_VSYSLOG) check_symbol_exists(vsyslog "syslog.h" HAVE_VSYSLOG)
endif() endif()
if (HAVE_SYS_RANDOM_H)
check_symbol_exists(getrandom "sys/random.h" HAVE_GETRANDOM)
endif()
if (HAVE_SYS_RESOURCE_H) if (HAVE_SYS_RESOURCE_H)
check_symbol_exists(getrusage "sys/resource.h" HAVE_GETRUSAGE) check_symbol_exists(getrusage "sys/resource.h" HAVE_GETRUSAGE)
endif() endif()
@@ -265,7 +289,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_DIR}/config.h")
configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h) configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h)
message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h") message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h")
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
if ("${DISABLE_WERROR}" STREQUAL "OFF") if ("${DISABLE_WERROR}" STREQUAL "OFF")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
@@ -354,14 +378,13 @@ set(JSON_C_PUBLIC_HEADERS
# Note: config.h is _not_ included here # Note: config.h is _not_ included here
${PROJECT_BINARY_DIR}/json_config.h ${PROJECT_BINARY_DIR}/json_config.h
${PROJECT_SOURCE_DIR}/json.h ${PROJECT_BINARY_DIR}/json.h
${PROJECT_SOURCE_DIR}/arraylist.h ${PROJECT_SOURCE_DIR}/arraylist.h
${PROJECT_SOURCE_DIR}/debug.h ${PROJECT_SOURCE_DIR}/debug.h
${PROJECT_SOURCE_DIR}/json_c_version.h ${PROJECT_SOURCE_DIR}/json_c_version.h
${PROJECT_SOURCE_DIR}/json_inttypes.h ${PROJECT_SOURCE_DIR}/json_inttypes.h
${PROJECT_SOURCE_DIR}/json_object.h ${PROJECT_SOURCE_DIR}/json_object.h
${PROJECT_SOURCE_DIR}/json_object_iterator.h ${PROJECT_SOURCE_DIR}/json_object_iterator.h
${PROJECT_SOURCE_DIR}/json_pointer.h
${PROJECT_SOURCE_DIR}/json_tokener.h ${PROJECT_SOURCE_DIR}/json_tokener.h
${PROJECT_SOURCE_DIR}/json_types.h ${PROJECT_SOURCE_DIR}/json_types.h
${PROJECT_SOURCE_DIR}/json_util.h ${PROJECT_SOURCE_DIR}/json_util.h
@@ -388,7 +411,6 @@ set(JSON_C_SOURCES
${PROJECT_SOURCE_DIR}/json_c_version.c ${PROJECT_SOURCE_DIR}/json_c_version.c
${PROJECT_SOURCE_DIR}/json_object.c ${PROJECT_SOURCE_DIR}/json_object.c
${PROJECT_SOURCE_DIR}/json_object_iterator.c ${PROJECT_SOURCE_DIR}/json_object_iterator.c
${PROJECT_SOURCE_DIR}/json_pointer.c
${PROJECT_SOURCE_DIR}/json_tokener.c ${PROJECT_SOURCE_DIR}/json_tokener.c
${PROJECT_SOURCE_DIR}/json_util.c ${PROJECT_SOURCE_DIR}/json_util.c
${PROJECT_SOURCE_DIR}/json_visit.c ${PROJECT_SOURCE_DIR}/json_visit.c
@@ -398,16 +420,31 @@ set(JSON_C_SOURCES
${PROJECT_SOURCE_DIR}/strerror_override.c ${PROJECT_SOURCE_DIR}/strerror_override.c
) )
if (NOT DISABLE_JSON_POINTER)
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\"")
else()
set(JSON_H_JSON_POINTER "")
endif()
configure_file(json.h.cmakein ${PROJECT_BINARY_DIR}/json.h @ONLY)
include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR}) include_directories(${PROJECT_BINARY_DIR})
add_subdirectory(doc) add_subdirectory(doc)
# uninstall # "uninstall" custom target for make generators in unix like operating systems
add_custom_target(uninstall # and if that target is not present
COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} if(NOT TARGET uninstall)
) add_custom_target(uninstall
COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
endif()
# XXX for a normal full distribution we'll need to figure out # XXX for a normal full distribution we'll need to figure out
# XXX how to build both shared and static libraries. # XXX how to build both shared and static libraries.
@@ -417,7 +454,7 @@ add_library(${PROJECT_NAME}
${JSON_C_HEADERS} ${JSON_C_HEADERS}
) )
set_target_properties(${PROJECT_NAME} PROPERTIES set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION 5.1.0 VERSION 5.2.0
SOVERSION 5) SOVERSION 5)
list(APPEND CMAKE_TARGETS ${PROJECT_NAME}) list(APPEND CMAKE_TARGETS ${PROJECT_NAME})
# If json-c is used as subroject it set to target correct interface -I flags and allow # If json-c is used as subroject it set to target correct interface -I flags and allow
@@ -435,6 +472,11 @@ if (BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
${JSON_C_SOURCES} ${JSON_C_SOURCES}
${JSON_C_HEADERS} ${JSON_C_HEADERS}
) )
target_include_directories(${PROJECT_NAME}-static
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
)
# rename the static library # rename the static library
if (NOT MSVC) if (NOT MSVC)
@@ -461,7 +503,7 @@ install(TARGETS ${CMAKE_TARGETS}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/json-c
) )
install(EXPORT ${PROJECT_NAME}-targets install(EXPORT ${PROJECT_NAME}-targets
@@ -494,4 +536,5 @@ if (UNIX OR MINGW OR CYGWIN)
install(FILES ${PROJECT_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}") install(FILES ${PROJECT_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")
endif () endif ()
install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/json-c) install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/json-c)

View File

@@ -1,6 +1,60 @@
Next Release 0.15 0.16 (up to commit 66dcdf5, 2022-04-13)
===================== ========================================
Deprecated and removed features:
--------------------------------
* JSON_C_OBJECT_KEY_IS_CONSTANT is deprecated in favor of
JSON_C_OBJECT_ADD_CONSTANT_KEY
* Direct access to lh_table and lh_entry structure members is deprecated.
Use access functions instead, lh_table_head(), lh_entry_next(), etc...
* Drop REFCOUNT_DEBUG code.
New features
------------
* The 0.16 release introduces no new features
Build changes
-------------
* Add a DISABLE_EXTRA_LIBS option to skip using libbsd
* Add a DISABLE_JSON_POINTER option to skip compiling in json_pointer support.
Significant changes and bug fixes
---------------------------------
* Cap string length at INT_MAX to avoid various issues with very long strings.
* json_object_deep_copy: fix deep copy of strings containing '\0'
* Fix read past end of buffer in the "json_parse" command
* Avoid out of memory accesses in the locally provided vasprintf() function
(for those platforms that use it)
* Handle allocation failure in json_tokener_new_ex
* Fix use-after-free in json_tokener_new_ex() in the event of printbuf_new() returning NULL
* printbuf_memset(): set gaps to zero - areas within the print buffer which
have not been initialized by using printbuf_memset
* printbuf: return -1 on invalid arguments (len < 0 or total buffer > INT_MAX)
* sprintbuf(): propagate printbuf_memappend errors back to the caller
Optimizations
--------------
* Speed up parsing by replacing ctype functions with simplified, faster
non-locale-sensitive ones in json_tokener and json_object_to_json_string.
* Neither vertical tab nor formfeed are considered whitespace per the JSON spec
* json_object: speed up creation of objects, calloc() -> malloc() + set fields
* Avoid needless extra strlen() call in json_c_shallow_copy_default() and
json_object_equal() when the object is known to be a json_type_string.
Other changes
-------------
* Validate size arguments in arraylist functions.
* Use getrandom() if available; with GRND_NONBLOCK to allow use of json-c
very early during boot, such as part of cryptsetup.
* Use arc4random() if it's available.
* random_seed: on error, continue to next method instead of exiting the process
* Close file when unable to read from /dev/urandom in get_dev_random_seed()
***
0.15 (up to commit 870965e, 2020/07/26)
========================================
Deprecated and removed features: Deprecated and removed features:
-------------------------------- --------------------------------
@@ -59,7 +113,7 @@ Other changes
* #589 - Detect broken RDRAND during initialization; also, fix segfault * #589 - Detect broken RDRAND during initialization; also, fix segfault
in the CPUID check. in the CPUID check.
* #592 - Fix integer overflows to prevert out of bounds write on large input. * #592 - Fix integer overflows to prevert out of bounds write on large input.
* Protect against division by zero in linkhash, when creaed with zero size. * Protect against division by zero in linkhash, when created with zero size.
* #602 - Fix json_parse_uint64() internal error checking, leaving the retval * #602 - Fix json_parse_uint64() internal error checking, leaving the retval
untouched in more failure cases. untouched in more failure cases.
* #614 - Prevent truncation when custom double formatters insert extra \0's * #614 - Prevent truncation when custom double formatters insert extra \0's
@@ -185,7 +239,7 @@ Behavior changes:
* Use size_t for array length and size. Platforms where sizeof(size_t) != sizeof(int) may not be backwards compatible * Use size_t for array length and size. Platforms where sizeof(size_t) != sizeof(int) may not be backwards compatible
See commits 45c56b, 92e9a5 and others. See commits 45c56b, 92e9a5 and others.
* Check for failue when allocating memory, returning NULL and errno=ENOMEM. * Check for failure when allocating memory, returning NULL and errno=ENOMEM.
See commit 2149a04. See commit 2149a04.
* Change json_object_object_add() return type from void to int, and will return -1 on failures, instead of exiting. (Note: this is not an ABI change) * Change json_object_object_add() return type from void to int, and will return -1 on failures, instead of exiting. (Note: this is not an ABI change)
@@ -376,7 +430,7 @@ List of new functions added:
* Add an alternative iterator implementation, see json_object_iterator.h * Add an alternative iterator implementation, see json_object_iterator.h
* Make json_object_iter public to enable external use of the * Make json_object_iter public to enable external use of the
json_object_object_foreachC macro. json_object_object_foreachC macro.
* Add a printbuf_memset() function to provide an effecient way to set and * Add a printbuf_memset() function to provide an efficient way to set and
append things like whitespace indentation. append things like whitespace indentation.
* Adjust json_object_is_type and json_object_get_type so they return * Adjust json_object_is_type and json_object_get_type so they return
json_type_null for NULL objects and handle NULL passed to json_type_null for NULL objects and handle NULL passed to
@@ -462,7 +516,7 @@ List of new functions added:
0.7 0.7
=== ===
* Add escaping of backslash to json output * Add escaping of backslash to json output
* Add escaping of foward slash on tokenizing and output * Add escaping of forward slash on tokenizing and output
* Changes to internal tokenizer from using recursion to * Changes to internal tokenizer from using recursion to
using a depth state structure to allow incremental parsing using a depth state structure to allow incremental parsing

View File

@@ -26,12 +26,12 @@
</ul> </ul>
<h3>Documentation</h3> <h3>Documentation</h3>
<P>Doxygen generated documentation exists <a href="http://json-c.github.io/json-c/">here</a>.</P> <P>Doxygen generated documentation exists <a href="https://json-c.github.io/json-c/">here</a>.</P>
<h3><a href="https://github.com/json-c/json-c">GIT Reposository</a></h3> <h3><a href="https://github.com/json-c/json-c">GIT Reposository</a></h3>
<p><strong><code>git clone https://github.com/json-c/json-c.git</code></strong></p> <p><strong><code>git clone https://github.com/json-c/json-c.git</code></strong></p>
<h3><a href="http://groups.google.com/group/json-c">Mailing List</a></h3> <h3><a href="https://groups.google.com/group/json-c">Mailing List</a></h3>
<pi>Send email to <strong><code>json-c <i>&lt;at&gt;</i> googlegroups <i>&lt;dot&gt;</i> com</code></strong></p> <pi>Send email to <strong><code>json-c <i>&lt;at&gt;</i> googlegroups <i>&lt;dot&gt;</i> com</code></strong></p>
<h3><a href="COPYING">License</a></h3> <h3><a href="COPYING">License</a></h3>

View File

@@ -16,6 +16,17 @@
JSON-C - A JSON implementation in C <a name="overview"></a> JSON-C - A JSON implementation in C <a name="overview"></a>
----------------------------------- -----------------------------------
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).
Skip down to [Using json-c](#using)
or check out the [API docs](https://json-c.github.io/json-c/),
if you already have json-c installed and ready to use.
Home page for json-c: https://github.com/json-c/json-c/wiki
Build Status 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) * [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) * [Travis Build](https://travis-ci.org/json-c/json-c) ![Travis Build Status](https://travis-ci.org/json-c/json-c.svg?branch=master)
@@ -23,21 +34,17 @@ Build Status
Test Status 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) * [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)
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).
Building on Unix with `git`, `gcc` and `cmake` <a name="buildunix"></a> Building on Unix with `git`, `gcc` and `cmake` <a name="buildunix"></a>
-------------------------------------------------- --------------------------------------------------
Home page for json-c: https://github.com/json-c/json-c/wiki If you already have json-c installed, see [Linking to `libjson-c`](#linking)
for how to build and link your program against it.
### Prerequisites: <a name="installprereq"></a> ### Prerequisites: <a name="installprereq"></a>
- `gcc`, `clang`, or another C compiler - `gcc`, `clang`, or another C compiler
- cmake>=2.8, >=3.16 recommended - `cmake>=2.8`, `>=3.16` recommended, `cmake=>3.1` for tests
To generate docs you'll also need: To generate docs you'll also need:
- `doxygen>=1.8.13` - `doxygen>=1.8.13`
@@ -80,7 +87,7 @@ $ make install
### Generating documentation with Doxygen: ### Generating documentation with Doxygen:
The libray documentation can be generated directly from the source codes using Doxygen tool: The library documentation can be generated directly from the source code using Doxygen tool:
```sh ```sh
# in build directory # in build directory
@@ -186,7 +193,7 @@ If a test fails, check `Testing/Temporary/LastTest.log`,
`tests/testSubDir/${testname}/${testname}.vg.out`, and other similar files. `tests/testSubDir/${testname}/${testname}.vg.out`, and other similar files.
If there is insufficient output try: If there is insufficient output try:
```sh ```sh
VERBOSE=1 make test VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 make test
``` ```
or or
```sh ```sh
@@ -220,19 +227,36 @@ CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c) LDFLAGS += $(shell pkg-config --libs json-c)
``` ```
Without `pkgconfig`, you would do something like this: Without `pkgconfig`, you might do something like this:
```make ```make
JSON_C_DIR=/path/to/json_c/install JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c CFLAGS += -I$(JSON_C_DIR)/include/json-c
# Or to use lines like: #include <json-c/json_object.h>
#CFLAGS += -I$(JSON_C_DIR)/include
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c
``` ```
If your project uses cmake:
* Add to your CMakeLists.txt file:
```cmake
find_package(json-c CONFIG)
target_link_libraries(${PROJECT_NAME} PRIVATE json-c::json-c)
```
* Then you might run in your project:
```sh
cd build
cmake -DCMAKE_PREFIX_PATH=/path/to/json_c/install/lib64/cmake ..
```
Using json-c <a name="using"> Using json-c <a name="using">
------------ ------------
To use json-c you can either include json.h, or preferrably, one of the To use json-c you can either include json.h, or preferably, one of the
following more specific header files: following more specific header files:
* json_object.h - Core types and methods. * json_object.h - Core types and methods.
@@ -241,9 +265,9 @@ following more specific header files:
objects from a json-c object tree. objects from a json-c object tree.
* json_object_iterator.h - Methods for iterating over single json_object instances. (See also `json_object_object_foreach()` in json_object.h) * json_object_iterator.h - Methods for iterating over single json_object instances. (See also `json_object_object_foreach()` in json_object.h)
* json_visit.h - Methods for walking a tree of json-c objects. * json_visit.h - Methods for walking a tree of json-c objects.
* json_util.h - Miscelleanous utility functions. * json_util.h - Miscellaneous utility functions.
For a full list of headers see [files.html](http://json-c.github.io/json-c/json-c-current-release/doc/html/files.html) For a full list of headers see [files.html](https://json-c.github.io/json-c/json-c-current-release/doc/html/files.html)
The primary type in json-c is json_object. It describes a reference counted The primary type in json-c is json_object. It describes a reference counted
tree of json objects which are created by either parsing text with a tree of json objects which are created by either parsing text with a
@@ -251,7 +275,7 @@ json_tokener (i.e. `json_tokener_parse_ex()`), or by creating
(with `json_object_new_object()`, `json_object_new_int()`, etc...) and adding (with `json_object_new_object()`, `json_object_new_int()`, etc...) and adding
(with `json_object_object_add()`, `json_object_array_add()`, etc...) them (with `json_object_object_add()`, `json_object_array_add()`, etc...) them
individually. individually.
Typically, every object in the tree will have one reference, from it's parent. Typically, every object in the tree will have one reference, from its parent.
When you are done with the tree of objects, you call json_object_put() on just When you are done with the tree of objects, you call json_object_put() on just
the root object to free it, which recurses down through any child objects the root object to free it, which recurses down through any child objects
calling json_object_put() on each one of those in turn. calling json_object_put() on each one of those in turn.
@@ -266,7 +290,7 @@ the parent being freed or it being removed from its parent
When parsing text, the json_tokener object is independent from the json_object When parsing text, the json_tokener object is independent from the json_object
that it returns. It can be allocated (`json_tokener_new()`) that it returns. It can be allocated (`json_tokener_new()`)
used ones or multiple times (`json_tokener_parse_ex()`, and used one or multiple times (`json_tokener_parse_ex()`, and
freed (`json_tokener_free()`) while the json_object objects live on. freed (`json_tokener_free()`) while the json_object objects live on.
A json_object tree can be serialized back into a string with A json_object tree can be serialized back into a string with

View File

@@ -20,7 +20,14 @@
* Mention removed features in ChangeLog * Mention removed features in ChangeLog
* Consider re-adding backwards compatible support, through symbol * Consider re-adding backwards compatible support, through symbol
aliases and appropriate entries in json-c.sym aliases and appropriate entries in json-c.sym
* Be sure any new symbols are listed in json-c.sym as part of
the _new_ release version.
* Update the AUTHORS file * Update the AUTHORS file
PREV=$(git tag | tail -1)
( git log -r ${PREV}..HEAD | grep Author: | sed -e's/Author: //' ; cat AUTHORS ) | sort -u > A1
mv A1 AUTHORS
* Exclude mentioning changes that have already been included in a point * Exclude mentioning changes that have already been included in a point
release of the previous release branch. release of the previous release branch.
@@ -33,14 +40,14 @@
## Release creation ## Release creation
Start creating the new release: Start creating the new release:
release=0.15 release=0.16
git clone https://github.com/json-c/json-c json-c-${release} git clone https://github.com/json-c/json-c json-c-${release}
mkdir distcheck mkdir distcheck
cd distcheck cd distcheck
# Note, the build directory *must* be entirely separate from # Note, the build directory *must* be entirely separate from
# the source tree for distcheck to work properly. # the source tree for distcheck to work properly.
cmake ../json-c-${release} cmake -DCMAKE_BUILD_TYPE=Release ../json-c-${release}
make distcheck make distcheck
cd .. cd ..
@@ -55,7 +62,6 @@ Make any fixes/changes *before* branching.
Using ${release}: Using ${release}:
Update the version in json_c_version.h Update the version in json_c_version.h
Update the version in CMakeLists.txt (VERSION in the project(...) line) Update the version in CMakeLists.txt (VERSION in the project(...) line)
Update the version in config.h.win32 (several places)
Update the set_target_properties() line in CmakeLists.txt to set the shared Update the set_target_properties() line in CmakeLists.txt to set the shared
library version. Generally, unless we're doing a major release, change: library version. Generally, unless we're doing a major release, change:
@@ -74,9 +80,11 @@ If we're doing a major release (SONAME bump), also bump the version
Generate the doxygen documentation: Generate the doxygen documentation:
doxygen (cd ../distcheck && make doc)
cp -r -p ../distcheck/doc/{html,Doxyfile} doc/.
rm doc/Doxyfile # Remove generated file w/ hardcoded paths
git add -f doc git add -f doc
git commit doc git commit doc -m "Generate docs for the ${release} release"
------------ ------------
@@ -86,7 +94,7 @@ Create the release tarballs:
echo .git > excludes echo .git > excludes
tar -czf json-c-${release}.tar.gz -X excludes json-c-${release} tar -czf json-c-${release}.tar.gz -X excludes json-c-${release}
echo doc >> excludes echo 'doc/*' >> excludes
tar -czf json-c-${release}-nodoc.tar.gz -X excludes json-c-${release} tar -czf json-c-${release}-nodoc.tar.gz -X excludes json-c-${release}
------------ ------------
@@ -104,7 +112,7 @@ Tag the branch:
Go to Amazon S3 service at: Go to Amazon S3 service at:
https://console.aws.amazon.com/s3/ https://console.aws.amazon.com/s3/
Upload the two tarballs in the json-c_releases folder. Upload the two tarballs in the json-c_releases/releases folder.
When uploading, use "Standard" storage class, and make the uploaded files publicly accessible. When uploading, use "Standard" storage class, and make the uploaded files publicly accessible.
Logout of Amazon S3, and verify that the files are visible. Logout of Amazon S3, and verify that the files are visible.
@@ -121,13 +129,14 @@ Add new section to ChangeLog for ${release}+1
Use ${release}.99 to indicate a version "newer" than anything on the branch: Use ${release}.99 to indicate a version "newer" than anything on the branch:
Update the version in json_c_version.h Update the version in json_c_version.h
Update the version in CMakeLists.txt Update the version in CMakeLists.txt
Update the version in config.h.win32
Update RELEASE_CHECKLIST.txt, set release=${release}+1 Update RELEASE_CHECKLIST.txt, set release=${release}+1
Add a new empty section to the json-c.sym file, for ${release}+1
Update the set_target_properties() line in CmakeLists.txt to match the release branch. Update the set_target_properties() line in CmakeLists.txt to match the release branch.
git commit -a -m "Update the master branch to version 0.${release}.99" git commit -a -m "Update the master branch to version ${release}.99"
git push git push
------------ ------------
@@ -143,6 +152,8 @@ Update the gh-pages branch with new docs:
mkdir json-c-${release} mkdir json-c-${release}
cp -R ../json-c-${release}/doc json-c-${release}/. cp -R ../json-c-${release}/doc json-c-${release}/.
git add json-c-${release} git add json-c-${release}
rm json-c-current-release
ln -s json-c-${release} json-c-current-release
git commit -a -m "Add the ${release} docs." git commit -a -m "Add the ${release} docs."
vi index.html vi index.html

View File

@@ -82,7 +82,8 @@ static int parseit(int fd, int (*callback)(struct json_object *))
int parse_end = json_tokener_get_parse_end(tok); int parse_end = json_tokener_get_parse_end(tok);
if (obj == NULL && jerr != json_tokener_continue) if (obj == NULL && jerr != json_tokener_continue)
{ {
char *aterr = &buf[start_pos + parse_end]; char *aterr = (start_pos + parse_end < sizeof(buf)) ?
&buf[start_pos + parse_end] : "";
fflush(stdout); fflush(stdout);
int fail_offset = total_read - ret + start_pos + parse_end; int fail_offset = total_read - ret + start_pos + parse_end;
fprintf(stderr, "Failed at offset %d: %s %c\n", fail_offset, fprintf(stderr, "Failed at offset %d: %s %c\n", fail_offset,

View File

@@ -1,37 +1,125 @@
version: '{branch}.{build}' version: '{branch}.{build}'
os: Windows Server 2012 R2
image:
# b_toolset: v143
- Visual Studio 2022
# VS2015 also used for earlier VS builds
# aka os: Windows Server 2012 R2
- Visual Studio 2015
# aka os: Windows Server 2016
# b_toolset: v141
- Visual Studio 2017
# aka os: Windows Server 2019
# b_toolset: v142
- Visual Studio 2019
platform: x64 platform: x64
# There should be a better way to set-up a build matrix.
environment: environment:
matrix: matrix:
- b_toolset: Windows7.1SDK - b_toolset: Windows7.1SDK
b_config: Debug
- b_toolset: Windows7.1SDK
b_config: Release
- b_toolset: v120 - b_toolset: v120
b_config: Debug
- b_toolset: v120
b_config: Release
- b_toolset: v140 - b_toolset: v140
b_config: Debug
- b_toolset: v140 - b_toolset: v141
b_config: Release
- b_toolset: v142
- b_toolset: v143
configuration:
- Debug
- Release
build_script: build_script:
- cmake -T %b_toolset% -DCMAKE_BUILD_TYPE=%b_config% -DCMAKE_INSTALL_PREFIX=t_install . - cmake -T %b_toolset% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=t_install .
- cmake --build . --target install - cmake --build . --target install
matrix:
exclude:
# Skip release builds for all except the newest image
- image: Visual Studio 2015
configuration: Release
# In the "old" image, new toolsets aren't available:
- image: Visual Studio 2015
b_toolset: v141
- image: Visual Studio 2015
b_toolset: v142
- image: Visual Studio 2015
b_toolset: v143
# ----
- image: Visual Studio 2017
configuration: Release
# In the "new" images, exclude all toolsets except the relevant
# one for that image:
- image: Visual Studio 2017
b_toolset: Windows7.1SDK
- image: Visual Studio 2017
b_toolset: v120
- image: Visual Studio 2017
b_toolset: v140
- image: Visual Studio 2017
b_toolset: v142
- image: Visual Studio 2017
b_toolset: v143
# ----
- image: Visual Studio 2019
configuration: Release
- image: Visual Studio 2019
b_toolset: Windows7.1SDK
- image: Visual Studio 2019
b_toolset: v120
- image: Visual Studio 2019
b_toolset: v140
- image: Visual Studio 2019
b_toolset: v141
- image: Visual Studio 2019
b_toolset: v143
# ----
- image: Visual Studio 2022
b_toolset: Windows7.1SDK
- image: Visual Studio 2022
b_toolset: v120
- image: Visual Studio 2022
b_toolset: v140
- image: Visual Studio 2022
b_toolset: v141
- image: Visual Studio 2022
b_toolset: v142
after_build: after_build:
- cd t_install - cd t_install
- 7z a ../json-c.win32.%b_toolset%.%b_config%.zip * - 7z a ../json-c.win32.%b_toolset%.%CONFIGURATION%.zip *
artifacts: artifacts:
- path: json-c.win32.%b_toolset%.%b_config%.zip - path: json-c.win32.%b_toolset%.%CONFIGURATION%.zip
name: json-c.win32.%b_toolset%.%b_config%.zip name: json-c.win32.%b_toolset%.%CONFIGURATION%.zip

View File

@@ -45,6 +45,8 @@ struct array_list *array_list_new2(array_list_free_fn *free_fn, int initial_size
{ {
struct array_list *arr; struct array_list *arr;
if (initial_size < 0 || (size_t)initial_size >= SIZE_T_MAX / sizeof(void *))
return NULL;
arr = (struct array_list *)malloc(sizeof(struct array_list)); arr = (struct array_list *)malloc(sizeof(struct array_list));
if (!arr) if (!arr)
return NULL; return NULL;
@@ -106,6 +108,8 @@ int array_list_shrink(struct array_list *arr, size_t empty_slots)
void *t; void *t;
size_t new_size; size_t new_size;
if (empty_slots >= SIZE_T_MAX / sizeof(void *) - arr->length)
return -1;
new_size = arr->length + empty_slots; new_size = arr->length + empty_slots;
if (new_size == arr->size) if (new_size == arr->size)
return 0; return 0;

View File

@@ -15,8 +15,8 @@
* Although this is exposed by the json_object_get_array() method, * Although this is exposed by the json_object_get_array() method,
* it is not recommended for direct use. * it is not recommended for direct use.
*/ */
#ifndef _arraylist_h_ #ifndef _json_c_arraylist_h_
#define _arraylist_h_ #define _json_c_arraylist_h_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -70,7 +70,7 @@ Issues
Using heaptrack, and analyzing the histogram, only shows ~2.6MB Using heaptrack, and analyzing the histogram, only shows ~2.6MB
``` ```
heaptrack ./json_parse -n canada.json heaptrack ./json_parse -n canada.json
heaptrack --analyze heaptrack*gz -H histgram.out heaptrack --analyze heaptrack*gz -H histogram.out
awk ' { s=$1; count=$2; ru=(int((s+ 15) / 16)) * 16; wasted = ((ru-s)*count); print s, count, ru-s, wasted; total=total+wasted} END { print "Total: ", total }' histogram.out awk ' { s=$1; count=$2; ru=(int((s+ 15) / 16)) * 16; wasted = ((ru-s)*count); print s, count, ru-s, wasted; total=total+wasted} END { print "Total: ", total }' histogram.out
``` ```

View File

@@ -30,6 +30,7 @@ $0 [<configure_options>] [-- [<cmake options>]]
--enable-static build static libraries [default=yes] --enable-static build static libraries [default=yes]
--disable-Bsymbolic Avoid linking with -Bsymbolic-function --disable-Bsymbolic Avoid linking with -Bsymbolic-function
--disable-werror Avoid treating compiler warnings as fatal errors --disable-werror Avoid treating compiler warnings as fatal errors
--disable-extra-libs Avoid linking against extra libraries, such as libbsd
EOF EOF
exit exit
@@ -73,6 +74,9 @@ while [ $# -gt 0 ] ; do
--disable-werror) --disable-werror)
FLAGS+=(-DDISABLE_WERROR=ON) FLAGS+=(-DDISABLE_WERROR=ON)
;; ;;
--disable-extra-libs)
FLAGS+=(-DDISABLE_EXTRA_LIBS=ON)
;;
--) --)
shift shift
break break

View File

@@ -56,6 +56,9 @@
/* Define to 1 if you have the <sys/param.h> header file. */ /* Define to 1 if you have the <sys/param.h> header file. */
#cmakedefine HAVE_SYS_PARAM_H @HAVE_SYS_PARAM_H@ #cmakedefine HAVE_SYS_PARAM_H @HAVE_SYS_PARAM_H@
/* Define to 1 if you have the <sys/random.h> header file. */
#cmakedefine HAVE_SYS_RANDOM_H
/* Define to 1 if you have the <sys/resource.h> header file. */ /* Define to 1 if you have the <sys/resource.h> header file. */
#cmakedefine HAVE_SYS_RESOURCE_H #cmakedefine HAVE_SYS_RESOURCE_H
@@ -71,6 +74,12 @@
/* Define to 1 if you have the <xlocale.h> header file. */ /* Define to 1 if you have the <xlocale.h> header file. */
#cmakedefine HAVE_XLOCALE_H #cmakedefine HAVE_XLOCALE_H
/* Define to 1 if you have the <bsd/stdlib.h> header file. */
#cmakedefine HAVE_BSD_STDLIB_H
/* Define to 1 if you have `arc4random' */
#cmakedefine HAVE_ARC4RANDOM
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#cmakedefine HAVE_DOPRNT #cmakedefine HAVE_DOPRNT
@@ -140,6 +149,9 @@
/* Define to 1 if you have the `vsyslog' function. */ /* Define to 1 if you have the `vsyslog' function. */
#cmakedefine HAVE_VSYSLOG @HAVE_VSYSLOG@ #cmakedefine HAVE_VSYSLOG @HAVE_VSYSLOG@
/* Define if you have the `getrandom' function. */
#cmakedefine HAVE_GETRANDOM
/* Define if you have the `getrusage' function. */ /* Define if you have the `getrusage' function. */
#cmakedefine HAVE_GETRUSAGE #cmakedefine HAVE_GETRUSAGE

View File

@@ -14,8 +14,8 @@
* @file * @file
* @brief Do not use, json-c internal, may be changed or removed at any time. * @brief Do not use, json-c internal, may be changed or removed at any time.
*/ */
#ifndef _DEBUG_H_ #ifndef _JSON_C_DEBUG_H_
#define _DEBUG_H_ #define _JSON_C_DEBUG_H_
#include <stdlib.h> #include <stdlib.h>
@@ -24,7 +24,7 @@ extern "C" {
#endif #endif
#ifndef JSON_EXPORT #ifndef JSON_EXPORT
#if defined(_MSC_VER) #if defined(_MSC_VER) && defined(JSON_C_DLL)
#define JSON_EXPORT __declspec(dllexport) #define JSON_EXPORT __declspec(dllexport)
#else #else
#define JSON_EXPORT extern #define JSON_EXPORT extern

File diff suppressed because it is too large Load Diff

View File

@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config file # This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text # that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # built into libc) for the transcoding. See https://www.gnu.org/software/libiconv
# for the list of possible encodings. # for the list of possible encodings.
# The default value is: UTF-8. # The default value is: UTF-8.
@@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started. # will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES. # This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH = STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which # path mentioned in the documentation of a class, which tells the reader which
@@ -285,7 +285,7 @@ EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable # according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details. # documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can # The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues. # case of backward compatibilities issues.
@@ -318,7 +318,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
# will parse them like normal C++ but will assume all classes use public instead # will parse them like normal C++ but will assume all classes use public instead
# of private inheritance when no explicit protection keyword is present. # of private inheritance when no explicit protection keyword is present.
# The default value is: NO. # The default value is: NO.
@@ -427,7 +427,7 @@ EXTRACT_PACKAGE = NO
# included in the documentation. # included in the documentation.
# The default value is: NO. # The default value is: NO.
EXTRACT_STATIC = NO EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO # locally in source files will be included in the documentation. If set to NO
@@ -677,7 +677,7 @@ LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib # the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool # extension is automatically appended if omitted. This requires the bibtex tool
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using # For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references. # search path. See also \cite for info how to create references.
@@ -758,7 +758,7 @@ INPUT = @CMAKE_SOURCE_DIR@ @CMAKE_BINARY_DIR@
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
# documentation (see: http://www.gnu.org/software/libiconv) for the list of # documentation (see: https://www.gnu.org/software/libiconv) for the list of
# possible encodings. # possible encodings.
# The default value is: UTF-8. # The default value is: UTF-8.
@@ -961,7 +961,7 @@ SOURCE_TOOLTIPS = YES
# If the USE_HTAGS tag is set to YES then the references to source code will # If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in # point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system # source browser. The htags tool is part of GNU's global source tagging system
# (see http://www.gnu.org/software/global/global.html). You will need version # (see https://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher. # 4.8.6 or higher.
# #
# To use it do the following: # To use it do the following:
@@ -989,7 +989,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = NO VERBATIM_HEADERS = NO
# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the # If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # clang parser (see: https://clang.llvm.org/) for more accurate parsing at the
# cost of reduced performance. This can be particularly helpful with template # cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type # rich C++ code for which doxygen's built-in parser lacks the necessary type
# information. # information.
@@ -1125,7 +1125,7 @@ HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the stylesheet and background images according to # will adjust the colors in the stylesheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see # this color. Hue is specified as an angle on a colorwheel, see
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value # https://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again. # purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220. # Minimum value: 0, maximum value: 359, default value: 220.
@@ -1183,12 +1183,13 @@ HTML_INDEX_NUM_ENTRIES = 100
# If the GENERATE_DOCSET tag is set to YES, additional index files will be # If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development # generated that can be used as input for Apple's Xcode 3 integrated development
# environment (see: http://developer.apple.com/tools/xcode/), introduced with # environment (see: https://developer.apple.com/tools/xcode/), introduced with
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
# Makefile in the HTML output directory. Running make will produce the docset in # Makefile in the HTML output directory. Running make will produce the docset in
# that directory and running make install will install the docset in # that directory and running make install will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # startup. See
# https://developer.apple.com/library/archive/featuredarticles/DoxygenXcode/
# for more information. # for more information.
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1304,7 +1305,7 @@ QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace # Project output. For more information please see Qt Help Project / Namespace
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project. # The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1312,8 +1313,8 @@ QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual # Help Project output. For more information please see Qt Help Project / Virtual
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # Folders (see:
# folders). # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
# The default value is: doc. # The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1321,23 +1322,23 @@ QHP_VIRTUAL_FOLDER = doc
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom # filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # Filters (see:
# filters). # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME = QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom # custom filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # Filters (see:
# filters). # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS = QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see: # project's filter section matches. Qt Help Project / Filter Attributes (see:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS =
@@ -1442,7 +1443,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering # https://www.mathjax.org) which uses client side Javascript for the rendering
# instead of using prerendered bitmaps. Use this if you do not have LaTeX # instead of using prerendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When # installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path # enabled you may also need to install MathJax separately and configure the path
@@ -1454,7 +1455,7 @@ USE_MATHJAX = NO
# When MathJax is enabled you can set the default output format to be used for # When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see: # the MathJax output. See the MathJax site (see:
# http://docs.mathjax.org/en/latest/output.html) for more details. # https://docs.mathjax.org/en/latest/output/) for more details.
# Possible values are: HTML-CSS (which is slower, but has the best # Possible values are: HTML-CSS (which is slower, but has the best
# compatibility), NativeMML (i.e. MathML) and SVG. # compatibility), NativeMML (i.e. MathML) and SVG.
# The default value is: HTML-CSS. # The default value is: HTML-CSS.
@@ -1469,11 +1470,11 @@ MATHJAX_FORMAT = HTML-CSS
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing # Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of # MathJax. However, it is strongly recommended to install a local copy of
# MathJax from http://www.mathjax.org before deployment. # MathJax from https://www.mathjax.org before deployment.
# The default value is: http://cdn.mathjax.org/mathjax/latest. # The default value is: https://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
# extension names that should be enabled during MathJax rendering. For example # extension names that should be enabled during MathJax rendering. For example
@@ -1484,7 +1485,7 @@ MATHJAX_EXTENSIONS =
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site # of code that will be used on startup of the MathJax code. See the MathJax site
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # (see: https://docs.mathjax.org/en/latest/output/) for more details. For an
# example see the documentation. # example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
@@ -1531,7 +1532,7 @@ SERVER_BASED_SEARCH = NO
# #
# Doxygen ships with an example indexer ( doxyindexer) and search engine # Doxygen ships with an example indexer ( doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library # (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/). # Xapian (see: https://xapian.org/).
# #
# See the section "External Indexing and Searching" for details. # See the section "External Indexing and Searching" for details.
# The default value is: NO. # The default value is: NO.
@@ -1544,7 +1545,7 @@ EXTERNAL_SEARCH = NO
# #
# Doxygen ships with an example indexer ( doxyindexer) and search engine # Doxygen ships with an example indexer ( doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library # (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/). See the section "External Indexing and # Xapian (see: https://xapian.org/). See the section "External Indexing and
# Searching" for details. # Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
@@ -1646,8 +1647,8 @@ EXTRA_PACKAGES =
# Note: Only use a user-defined header if you know what you are doing! The # Note: Only use a user-defined header if you know what you are doing! The
# following commands have a special meaning inside the header: $title, # following commands have a special meaning inside the header: $title,
# $datetime, $date, $doxygenversion, $projectname, $projectnumber, # $datetime, $date, $doxygenversion, $projectname, $projectnumber,
# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, # $projectbrief, $projectlogo. Doxygen will replace $title with the empty string,
# for the replacement values of the other commands the user is refered to # for the replacement values of the other commands the user is referred to
# HTML_HEADER. # HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -1717,7 +1718,7 @@ LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See # bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. # https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain. # The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -1984,7 +1985,9 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator. # recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = THIS_FUNCTION_IS_DEPRECATED(f)=f PREDEFINED = \
_LH_INLINE=inline \
JSON_C_CONST_FUNCTION(func)=func
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The # tag can be used to specify a list of macro names that should be expanded. The
@@ -2071,7 +2074,7 @@ CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc # You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see: # command. Doxygen will then run the mscgen tool (see:
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the # https://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where # documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the # the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path. # default search path.
@@ -2093,7 +2096,7 @@ HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see: # available from the path. This tool is part of Graphviz (see:
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is # Bell Labs. The other options in this section have no effect if this option is
# set to NO # set to NO
# The default value is: YES. # The default value is: YES.

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/README.md File Reference</title> <title>json-c: README.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -43,13 +43,13 @@
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="headertitle"> <div class="headertitle">
<div class="title">/home/erh/json-c-0.15/README.md File Reference</div> </div> <div class="title">README.md File Reference</div> </div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -61,7 +61,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/arraylist.h File Reference</title> <title>json-c: arraylist.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -445,7 +441,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -64,7 +64,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -56,12 +56,38 @@
<dt><a class="anchor" id="_deprecated000003"></a>Class <a class="el" href="structjson__tokener__srec.html">json_tokener_srec</a> </dt> <dt><a class="anchor" id="_deprecated000003"></a>Class <a class="el" href="structjson__tokener__srec.html">json_tokener_srec</a> </dt>
<dd>Don't use this outside of json_tokener.c, it will be made private in a future release. </dd> <dd>Don't use this outside of json_tokener.c, it will be made private in a future release. </dd>
<dt><a class="anchor" id="_deprecated000002"></a>Global <a class="el" href="json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2">json_tokener_state</a> </dt> <dt><a class="anchor" id="_deprecated000002"></a>Global <a class="el" href="json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2">json_tokener_state</a> </dt>
<dd>Don't use this outside of json_tokener.c, it will be made private in a future release. </dd> <dd>Don't use this outside of json_tokener.c, it will be made private in a future release. </dd>
<dt><a class="anchor" id="_deprecated000011"></a>Global <a class="el" href="structlh__entry.html#a79d9f1ef0dc444e17105aaeaf167e22c">lh_entry::k</a> </dt>
<dd>Use <a class="el" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">lh_entry_k()</a> instead of accessing this directly. </dd>
<dt><a class="anchor" id="_deprecated000012"></a>Global <a class="el" href="structlh__entry.html#a14f40cc124c32b03f81151ae7934d2e7">lh_entry::k_is_constant</a> </dt>
<dd>use <a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">lh_entry_k_is_constant()</a> instead. </dd>
<dt><a class="anchor" id="_deprecated000014"></a>Global <a class="el" href="structlh__entry.html#a7c40c46e72d9a0ba071a8d49d535bc67">lh_entry::next</a> </dt>
<dd>Use <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next()</a> instead of accessing this directly. </dd>
<dt><a class="anchor" id="_deprecated000015"></a>Global <a class="el" href="structlh__entry.html#a6fb9c3de01fb5af67d8d429921cc6a3b">lh_entry::prev</a> </dt>
<dd>Use <a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">lh_entry_prev()</a> instead of accessing this directly. </dd>
<dt><a class="anchor" id="_deprecated000013"></a>Global <a class="el" href="structlh__entry.html#a1b676732ab2ad3eeaedf6ec60a6a0835">lh_entry::v</a> </dt>
<dd>Use <a class="el" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">lh_entry_v()</a> instead of accessing this directly. </dd>
<dt><a class="anchor" id="_deprecated000017"></a>Global <a class="el" href="structlh__table.html#aa172ed8fe205367b54e0e2cdf9ea8c6c">lh_table::count</a> </dt>
<dd>Use <a class="el" href="linkhash_8h.html#ac9ba631c91fe80fb905f04c7cd526f2b">lh_table_length()</a> instead. </dd>
<dt><a class="anchor" id="_deprecated000023"></a>Global <a class="el" href="structlh__table.html#aa646c287a6a46e09da6c7457c981a359">lh_table::equal_fn</a> </dt>
<dd>do not use outside of linkhash.c </dd>
<dt><a class="anchor" id="_deprecated000021"></a>Global <a class="el" href="structlh__table.html#a30ea5903f4f8126abd6aa489ffe14737">lh_table::free_fn</a> </dt>
<dd>do not use outside of linkhash.c </dd>
<dt><a class="anchor" id="_deprecated000022"></a>Global <a class="el" href="structlh__table.html#a1488d1a4a320b1a9bb2f441859544be1">lh_table::hash_fn</a> </dt>
<dd>do not use outside of linkhash.c </dd>
<dt><a class="anchor" id="_deprecated000018"></a>Global <a class="el" href="structlh__table.html#aa7d986a3b12a9fa47e349713794c30fb">lh_table::head</a> </dt>
<dd>Use <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head()</a> instead. </dd>
<dt><a class="anchor" id="_deprecated000016"></a>Global <a class="el" href="structlh__table.html#ae251575ec2935bcb0e0589ca8e243839">lh_table::size</a> </dt>
<dd>do not use outside of linkhash.c </dd>
<dt><a class="anchor" id="_deprecated000020"></a>Global <a class="el" href="structlh__table.html#a4fd9c5aba38791b26ab0ec614a5caf8f">lh_table::table</a> </dt>
<dd>do not use outside of linkhash.c </dd>
<dt><a class="anchor" id="_deprecated000019"></a>Global <a class="el" href="structlh__table.html#a479895e45db2bdf9bf5d173fa4b7e277">lh_table::tail</a> </dt>
<dd>Do not use, may be removed in a future release. </dd>
</dl> </dl>
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -1,98 +0,0 @@
<!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: /home/erh/json-c-0.15 Directory 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
&#160;<span id="projectnumber">0.15</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&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">json-c-0.15 Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:arraylist_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="arraylist_8h.html">arraylist.h</a></td></tr>
<tr class="memdesc:arraylist_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal methods for working with json_type_array objects. Although this is exposed by the <a class="el" href="json__object_8h.html#a23d20e3f886c1638a7116be66b7b5ec2">json_object_get_array()</a> method, it is not recommended for direct use. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json_8h.html">json.h</a></td></tr>
<tr class="memdesc:json_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">A convenience header that may be included instead of other individual ones. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__c__version_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html">json_c_version.h</a></td></tr>
<tr class="memdesc:json__c__version_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Methods for retrieving the json-c version. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__inttypes_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__inttypes_8h.html">json_inttypes.h</a></td></tr>
<tr class="memdesc:json__inttypes_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do not use, json-c internal, may be changed or removed at any time. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__object_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html">json_object.h</a></td></tr>
<tr class="memdesc:json__object_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">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>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__object__iterator_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html">json_object_iterator.h</a></td></tr>
<tr class="memdesc:json__object__iterator_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">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>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__pointer_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__pointer_8h.html">json_pointer.h</a></td></tr>
<tr class="memdesc:json__pointer_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__tokener_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__tokener_8h.html">json_tokener.h</a></td></tr>
<tr class="memdesc:json__tokener_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Methods to parse an input string into a tree of json_object objects. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__types_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__types_8h.html">json_types.h</a></td></tr>
<tr class="memdesc:json__types_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic types used in a few places in json-c, but you should include "json_object.h" instead. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__util_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__util_8h.html">json_util.h</a></td></tr>
<tr class="memdesc:json__util_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Miscllaneous utility functions and macros. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:json__visit_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__visit_8h.html">json_visit.h</a></td></tr>
<tr class="memdesc:json__visit_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Methods for walking a tree of objects. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:linkhash_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html">linkhash.h</a></td></tr>
<tr class="memdesc:linkhash_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">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. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:printbuf_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="printbuf_8h.html">printbuf.h</a></td></tr>
<tr class="memdesc:printbuf_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal string buffer handing. 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. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<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

@@ -0,0 +1,62 @@
<!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: /home/erh/distcheck Directory 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
&#160;<span id="projectnumber">0.16</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&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_b62156a74b5a818be0c2ef9f85294b95.html">distcheck</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">distcheck Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:json_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json_8h.html">json.h</a></td></tr>
<tr class="memdesc:json_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">A convenience header that may be included instead of other individual ones. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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 &#160;<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

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -48,26 +48,26 @@
<div class="contents"> <div class="contents">
<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory"> <div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory"> <div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><img id="arr_0_" src="ftv2mlastnode.png" alt="\" width="16" height="22" onclick="toggleFolder('0_')"/><img id="img_0_" src="ftv2folderopen.png" alt="-" width="24" height="22" onclick="toggleFolder('0_')"/><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html" target="_self">json-c-0.15</a></td><td class="desc"></td></tr> <tr id="row_0_" class="even"><td class="entry"><img id="arr_0_" src="ftv2mnode.png" alt="o" width="16" height="22" onclick="toggleFolder('0_')"/><img id="img_0_" src="ftv2folderopen.png" alt="-" width="24" height="22" onclick="toggleFolder('0_')"/><a class="el" href="dir_b62156a74b5a818be0c2ef9f85294b95.html" target="_self">distcheck</a></td><td class="desc"></td></tr>
<tr id="row_0_0_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="arraylist_8h.html" target="_self">arraylist.h</a></td><td class="desc">Internal methods for working with json_type_array objects. Although this is exposed by the <a class="el" href="json__object_8h.html#a23d20e3f886c1638a7116be66b7b5ec2">json_object_get_array()</a> method, it is not recommended for direct use</td></tr> <tr id="row_0_0_"><td class="entry"><img src="ftv2vertline.png" alt="|" width="16" height="22" /><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json_8h.html" target="_self">json.h</a></td><td class="desc">A convenience header that may be included instead of other individual ones</td></tr>
<tr id="row_0_1_" class="even"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json_8h.html" target="_self">json.h</a></td><td class="desc">A convenience header that may be included instead of other individual ones</td></tr> <tr id="row_1_" 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="arraylist_8h.html" target="_self">arraylist.h</a></td><td class="desc">Internal methods for working with json_type_array objects. Although this is exposed by the <a class="el" href="json__object_8h.html#a23d20e3f886c1638a7116be66b7b5ec2">json_object_get_array()</a> method, it is not recommended for direct use</td></tr>
<tr id="row_0_2_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="json__c__version_8h.html" target="_self">json_c_version.h</a></td><td class="desc">Methods for retrieving the json-c version</td></tr> <tr id="row_2_"><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__c__version_8h.html" target="_self">json_c_version.h</a></td><td class="desc">Methods for retrieving the json-c version</td></tr>
<tr id="row_0_3_" class="even"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_4_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_5_" class="even"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_6_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_7_" class="even"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_8_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_9_" class="even"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_10_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_11_" class="even"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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_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_0_12_"><td class="entry"><img src="ftv2blank.png" alt="&#160;" width="16" height="22" /><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 handing. 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_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>
</table> </table>
</div><!-- directory --> </div><!-- directory -->
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -267,7 +267,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -267,7 +267,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -111,7 +111,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -80,12 +80,18 @@
<li>JSON_C_MINOR_VERSION <li>JSON_C_MINOR_VERSION
: <a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">json_c_version.h</a> : <a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">json_c_version.h</a>
</li> </li>
<li>JSON_C_OBJECT_ADD_CONSTANT_KEY
: <a class="el" href="json__object_8h.html#a4d303af657ca4ee8e487366ba9692c94">json_object.h</a>
</li>
<li>JSON_C_OBJECT_ADD_KEY_IS_NEW <li>JSON_C_OBJECT_ADD_KEY_IS_NEW
: <a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">json_object.h</a> : <a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">json_object.h</a>
</li> </li>
<li>JSON_C_OBJECT_KEY_IS_CONSTANT <li>JSON_C_OBJECT_KEY_IS_CONSTANT
: <a class="el" href="json__object_8h.html#a134ffafc6116799a20134dc7646b5a37">json_object.h</a> : <a class="el" href="json__object_8h.html#a134ffafc6116799a20134dc7646b5a37">json_object.h</a>
</li> </li>
<li>json_c_object_sizeof()
: <a class="el" href="json__object_8h.html#af50be932ec85694ae40141b46901bd00">json_object.h</a>
</li>
<li>JSON_C_OPTION_GLOBAL <li>JSON_C_OPTION_GLOBAL
: <a class="el" href="json__object_8h.html#a45837b8c6564f9e605f8a2bc76243750">json_object.h</a> : <a class="el" href="json__object_8h.html#a45837b8c6564f9e605f8a2bc76243750">json_object.h</a>
</li> </li>
@@ -650,7 +656,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -71,11 +71,23 @@
<li>lh_entry_free_fn <li>lh_entry_free_fn
: <a class="el" href="linkhash_8h.html#a671553d0ee3c2a123190ba0f8ed2b635">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a671553d0ee3c2a123190ba0f8ed2b635">linkhash.h</a>
</li> </li>
<li>lh_entry_k <li>lh_entry_k()
: <a class="el" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">linkhash.h</a>
</li> </li>
<li>lh_entry_v <li>lh_entry_k_is_constant()
: <a class="el" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">linkhash.h</a>
</li>
<li>lh_entry_next()
: <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">linkhash.h</a>
</li>
<li>lh_entry_prev()
: <a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">linkhash.h</a>
</li>
<li>lh_entry_set_val()
: <a class="el" href="linkhash_8h.html#ad94e87a8ef92ee6371e5314b7241e635">linkhash.h</a>
</li>
<li>lh_entry_v()
: <a class="el" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">linkhash.h</a>
</li> </li>
<li>lh_equal_fn <li>lh_equal_fn
: <a class="el" href="linkhash_8h.html#a91fd85fc81b0c7c83c62f00e84729091">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a91fd85fc81b0c7c83c62f00e84729091">linkhash.h</a>
@@ -89,6 +101,9 @@
<li>LH_FREED <li>LH_FREED
: <a class="el" href="linkhash_8h.html#ac69428f2de0a6fb080b6fb373d506aa7">linkhash.h</a> : <a class="el" href="linkhash_8h.html#ac69428f2de0a6fb080b6fb373d506aa7">linkhash.h</a>
</li> </li>
<li>lh_get_hash()
: <a class="el" href="linkhash_8h.html#a33c74c884530d407d0b3baa365238fb4">linkhash.h</a>
</li>
<li>lh_hash_fn <li>lh_hash_fn
: <a class="el" href="linkhash_8h.html#a38bae27995dcfb6ee3fb109a9be229b2">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a38bae27995dcfb6ee3fb109a9be229b2">linkhash.h</a>
</li> </li>
@@ -116,6 +131,9 @@
<li>lh_table_free() <li>lh_table_free()
: <a class="el" href="linkhash_8h.html#a81653acf740cf8c9fe672e6cd16df0cf">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a81653acf740cf8c9fe672e6cd16df0cf">linkhash.h</a>
</li> </li>
<li>lh_table_head()
: <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">linkhash.h</a>
</li>
<li>lh_table_insert() <li>lh_table_insert()
: <a class="el" href="linkhash_8h.html#a86c0cd547be1e2c2486a73bd58e1352c">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a86c0cd547be1e2c2486a73bd58e1352c">linkhash.h</a>
</li> </li>
@@ -144,7 +162,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -102,7 +102,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -75,7 +75,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -84,6 +84,9 @@
<li>JSON_C_MINOR_VERSION <li>JSON_C_MINOR_VERSION
: <a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">json_c_version.h</a> : <a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">json_c_version.h</a>
</li> </li>
<li>JSON_C_OBJECT_ADD_CONSTANT_KEY
: <a class="el" href="json__object_8h.html#a4d303af657ca4ee8e487366ba9692c94">json_object.h</a>
</li>
<li>JSON_C_OBJECT_ADD_KEY_IS_NEW <li>JSON_C_OBJECT_ADD_KEY_IS_NEW
: <a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">json_object.h</a> : <a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">json_object.h</a>
</li> </li>
@@ -145,9 +148,9 @@
: <a class="el" href="json__visit_8h.html#ac5be4a96b99b724833943003715dfc1c">json_visit.h</a> : <a class="el" href="json__visit_8h.html#ac5be4a96b99b724833943003715dfc1c">json_visit.h</a>
</li> </li>
<li>JSON_EXPORT <li>JSON_EXPORT
: <a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">printbuf.h</a> : <a class="el" href="json__types_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">json_types.h</a>
, <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="json__c__version_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">json_c_version.h</a>
, <a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">printbuf.h</a>
</li> </li>
<li>JSON_FILE_BUF_SIZE <li>JSON_FILE_BUF_SIZE
: <a class="el" href="json__util_8h.html#a084b6afc8f7fbef88976aabe4aca7efd">json_util.h</a> : <a class="el" href="json__util_8h.html#a084b6afc8f7fbef88976aabe4aca7efd">json_util.h</a>
@@ -186,12 +189,6 @@
<li>LH_EMPTY <li>LH_EMPTY
: <a class="el" href="linkhash_8h.html#a93fad7f8ae44575dc89c9567859972d2">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a93fad7f8ae44575dc89c9567859972d2">linkhash.h</a>
</li> </li>
<li>lh_entry_k
: <a class="el" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">linkhash.h</a>
</li>
<li>lh_entry_v
: <a class="el" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">linkhash.h</a>
</li>
<li>lh_foreach <li>lh_foreach
: <a class="el" href="linkhash_8h.html#ad7dd67da915065dce2c6f44cb03e2d82">linkhash.h</a> : <a class="el" href="linkhash_8h.html#ad7dd67da915065dce2c6f44cb03e2d82">linkhash.h</a>
</li> </li>
@@ -237,7 +234,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -67,7 +67,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -215,7 +215,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -102,8 +102,8 @@
<h3><a class="anchor" id="index_j"></a>- j -</h3><ul> <h3><a class="anchor" id="index_j"></a>- j -</h3><ul>
<li>JSON_C_CONST_FUNCTION() <li>json_c_object_sizeof()
: <a class="el" href="json__object_8h.html#a922b2d76c73da57174beec82d471743b">json_object.h</a> : <a class="el" href="json__object_8h.html#af50be932ec85694ae40141b46901bd00">json_object.h</a>
</li> </li>
<li>json_c_set_serialization_double_format() <li>json_c_set_serialization_double_format()
: <a class="el" href="json__object_8h.html#ac099272b46fde595831118720b155656">json_object.h</a> : <a class="el" href="json__object_8h.html#ac099272b46fde595831118720b155656">json_object.h</a>
@@ -391,6 +391,27 @@
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul> <h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
<li>lh_entry_k()
: <a class="el" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">linkhash.h</a>
</li>
<li>lh_entry_k_is_constant()
: <a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">linkhash.h</a>
</li>
<li>lh_entry_next()
: <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">linkhash.h</a>
</li>
<li>lh_entry_prev()
: <a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">linkhash.h</a>
</li>
<li>lh_entry_set_val()
: <a class="el" href="linkhash_8h.html#ad94e87a8ef92ee6371e5314b7241e635">linkhash.h</a>
</li>
<li>lh_entry_v()
: <a class="el" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">linkhash.h</a>
</li>
<li>lh_get_hash()
: <a class="el" href="linkhash_8h.html#a33c74c884530d407d0b3baa365238fb4">linkhash.h</a>
</li>
<li>lh_kchar_table_new() <li>lh_kchar_table_new()
: <a class="el" href="linkhash_8h.html#a6bf630754affe92612639542a6c49c3f">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a6bf630754affe92612639542a6c49c3f">linkhash.h</a>
</li> </li>
@@ -406,6 +427,9 @@
<li>lh_table_free() <li>lh_table_free()
: <a class="el" href="linkhash_8h.html#a81653acf740cf8c9fe672e6cd16df0cf">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a81653acf740cf8c9fe672e6cd16df0cf">linkhash.h</a>
</li> </li>
<li>lh_table_head()
: <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">linkhash.h</a>
</li>
<li>lh_table_insert() <li>lh_table_insert()
: <a class="el" href="linkhash_8h.html#a86c0cd547be1e2c2486a73bd58e1352c">linkhash.h</a> : <a class="el" href="linkhash_8h.html#a86c0cd547be1e2c2486a73bd58e1352c">linkhash.h</a>
</li> </li>
@@ -460,7 +484,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -106,7 +106,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -67,7 +67,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -55,6 +55,9 @@
<li><a href="#using">Using json-c</a></li> <li><a href="#using">Using json-c</a></li>
</ol> </ol>
<h2>JSON-C - A JSON implementation in C <a class="anchor" id="overview"></a></h2> <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>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>
<p>Build Status</p> <p>Build Status</p>
<ul> <ul>
<li><a href="https://ci.appveyor.com/project/hawicz/json-c">AppVeyor Build</a> <div class="image"> <li><a href="https://ci.appveyor.com/project/hawicz/json-c">AppVeyor Build</a> <div class="image">
@@ -70,15 +73,14 @@
<ul> <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> <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> </ul>
<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>
<h2>Building on Unix with <code>git</code>, <code>gcc</code> and <code>cmake</code> <a class="anchor" id="buildunix"></a></h2> <h2>Building on Unix with <code>git</code>, <code>gcc</code> and <code>cmake</code> <a class="anchor" id="buildunix"></a></h2>
<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> <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> <h3>Prerequisites: <a class="anchor" id="installprereq"></a></h3>
<ul> <ul>
<li><code>gcc</code>, <code>clang</code>, or another C compiler</li> <li><code>gcc</code>, <code>clang</code>, or another C compiler</li>
</ul> </ul>
<ul> <ul>
<li>cmake&gt;=2.8, &gt;=3.16 recommended</li> <li><code>cmake&gt;=2.8</code>, <code>&gt;=3.16</code> recommended, <code>cmake=&gt;3.1</code> for tests</li>
</ul> </ul>
<p>To generate docs you'll also need:</p> <p>To generate docs you'll also need:</p>
<ul> <ul>
@@ -103,7 +105,7 @@ $ make test
$ make USE_VALGRIND=0 test # optionally skip using valgrind $ make USE_VALGRIND=0 test # optionally skip using valgrind
$ make install $ make install
</pre><h3>Generating documentation with Doxygen:</h3> </pre><h3>Generating documentation with Doxygen:</h3>
<p>The libray documentation can be generated directly from the source codes using Doxygen tool: </p> <p>The library documentation can be generated directly from the source code using Doxygen tool: </p>
<pre class="fragment"># in build directory <pre class="fragment"># in build directory
make doc make doc
google-chrome doc/html/index.html google-chrome doc/html/index.html
@@ -182,7 +184,7 @@ make test
# By default, if valgrind is available running tests uses it. # By default, if valgrind is available running tests uses it.
make USE_VALGRIND=0 test # optionally skip using valgrind make USE_VALGRIND=0 test # optionally skip using valgrind
</pre><p>If a test fails, check <code>Testing/Temporary/LastTest.log</code>, <code>tests/testSubDir/${testname}/${testname}.vg.out</code>, and other similar files. If there is insufficient output try: </p> </pre><p>If a test fails, check <code>Testing/Temporary/LastTest.log</code>, <code>tests/testSubDir/${testname}/${testname}.vg.out</code>, and other similar files. If there is insufficient output try: </p>
<pre class="fragment">VERBOSE=1 make test <pre class="fragment">VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 make test
</pre><p>or </p> </pre><p>or </p>
<pre class="fragment">JSONC_TEST_TRACE=1 make test <pre class="fragment">JSONC_TEST_TRACE=1 make test
</pre><p>and check the log files again.</p> </pre><p>and check the log files again.</p>
@@ -198,29 +200,42 @@ vcpkg install json-c
<p>If your system has <code>pkgconfig</code>, then you can just add this to your <code>makefile</code>: </p> <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) <pre class="fragment">CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c) LDFLAGS += $(shell pkg-config --libs json-c)
</pre><p>Without <code>pkgconfig</code>, you would do something like this: </p> </pre><p>Without <code>pkgconfig</code>, you might do something like this: </p>
<pre class="fragment">JSON_C_DIR=/path/to/json_c/install <pre class="fragment">JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c CFLAGS += -I$(JSON_C_DIR)/include/json-c
# Or to use lines like: #include &lt;json-c/json_object.h&gt;
#CFLAGS += -I$(JSON_C_DIR)/include
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c
</pre><h2>Using json-c <a class="anchor" id="using"></a></h2> </pre><p>If your project uses cmake:</p>
<p>To use json-c you can either include <a class="el" href="json_8h.html" title="A convenience header that may be included instead of other individual ones.">json.h</a>, or preferrably, one of the following more specific header files:</p> <ul>
<li><p class="startli">Add to your CMakeLists.txt file:</p>
<p class="startli">find_package(json-c CONFIG) target_link_libraries(${PROJECT_NAME} PRIVATE json-c::json-c)</p>
</li>
</ul>
<ul>
<li><p class="startli">Then you might run in your project:</p>
<p class="startli">cd build cmake -DCMAKE_PREFIX_PATH=/path/to/json_c/install/lib64/cmake ..</p>
</li>
</ul>
<h2>Using json-c <a class="anchor" id="using"></a></h2>
<p>To use json-c you can either include <a class="el" href="json_8h.html" title="A convenience header that may be included instead of other individual ones.">json.h</a>, or preferably, one of the following more specific header files:</p>
<ul> <ul>
<li><a class="el" href="json__object_8h.html" title="Core json-c API. Start here, or with json_tokener.h.">json_object.h</a> - Core types and methods.</li> <li><a class="el" href="json__object_8h.html" title="Core json-c API. Start here, or with json_tokener.h.">json_object.h</a> - Core types and methods.</li>
<li><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> - Methods for parsing and serializing json-c object trees.</li> <li><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> - Methods for parsing and serializing json-c object trees.</li>
<li><a class="el" href="json__pointer_8h.html" title="JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree...">json_pointer.h</a> - JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree.</li> <li><a class="el" href="json__pointer_8h.html" title="JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree...">json_pointer.h</a> - JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree.</li>
<li><a class="el" href="json__object__iterator_8h.html" title="An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike json_object_object_foreach() and json_object_object_foreachC(), this avoids the need to expose json-c internals like lh_entry.">json_object_iterator.h</a> - Methods for iterating over single json_object instances. (See also <code><a class="el" href="json__object_8h.html#acf5f514a9e0061c10fc08055762639ee">json_object_object_foreach()</a></code> in <a class="el" href="json__object_8h.html" title="Core json-c API. Start here, or with json_tokener.h.">json_object.h</a>)</li> <li><a class="el" href="json__object__iterator_8h.html" title="An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike json_object_object_foreach() and json_object_object_foreachC(), this avoids the need to expose json-c internals like lh_entry.">json_object_iterator.h</a> - Methods for iterating over single json_object instances. (See also <code><a class="el" href="json__object_8h.html#acf5f514a9e0061c10fc08055762639ee">json_object_object_foreach()</a></code> in <a class="el" href="json__object_8h.html" title="Core json-c API. Start here, or with json_tokener.h.">json_object.h</a>)</li>
<li><a class="el" href="json__visit_8h.html" title="Methods for walking a tree of objects.">json_visit.h</a> - Methods for walking a tree of json-c objects.</li> <li><a class="el" href="json__visit_8h.html" title="Methods for walking a tree of objects.">json_visit.h</a> - Methods for walking a tree of json-c objects.</li>
<li><a class="el" href="json__util_8h.html" title="Miscllaneous utility functions and macros.">json_util.h</a> - Miscelleanous utility functions.</li> <li><a class="el" href="json__util_8h.html" title="Miscllaneous utility functions and macros.">json_util.h</a> - Miscellaneous utility functions.</li>
</ul> </ul>
<p>For a full list of headers see <a href="http://json-c.github.io/json-c/json-c-current-release/doc/html/files.html">files.html</a></p> <p>For a full list of headers see <a href="https://json-c.github.io/json-c/json-c-current-release/doc/html/files.html">files.html</a></p>
<p>The primary type in json-c is json_object. It describes a reference counted tree of json objects which are created by either parsing text with a <a class="el" href="structjson__tokener.html">json_tokener</a> (i.e. <code><a class="el" href="json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a">json_tokener_parse_ex()</a></code>), or by creating (with <code><a class="el" href="json__object_8h.html#a68c383f54544fca19b5f2425be397600">json_object_new_object()</a></code>, <code><a class="el" href="json__object_8h.html#ae92f0770fb4b3c884ce35de52d3d7de8">json_object_new_int()</a></code>, etc...) and adding (with <code><a class="el" href="json__object_8h.html#a27bd808a022251059a43f1f6370441cd">json_object_object_add()</a></code>, <code><a class="el" href="json__object_8h.html#a18cdd9a7455e09f36cdf6e5756b7f586">json_object_array_add()</a></code>, etc...) them individually. Typically, every object in the tree will have one reference, from it's parent. When you are done with the tree of objects, you call <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> on just the root object to free it, which recurses down through any child objects calling <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> on each one of those in turn.</p> <p>The primary type in json-c is json_object. It describes a reference counted tree of json objects which are created by either parsing text with a <a class="el" href="structjson__tokener.html">json_tokener</a> (i.e. <code><a class="el" href="json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a">json_tokener_parse_ex()</a></code>), or by creating (with <code><a class="el" href="json__object_8h.html#a68c383f54544fca19b5f2425be397600">json_object_new_object()</a></code>, <code><a class="el" href="json__object_8h.html#ae92f0770fb4b3c884ce35de52d3d7de8">json_object_new_int()</a></code>, etc...) and adding (with <code><a class="el" href="json__object_8h.html#a27bd808a022251059a43f1f6370441cd">json_object_object_add()</a></code>, <code><a class="el" href="json__object_8h.html#a18cdd9a7455e09f36cdf6e5756b7f586">json_object_array_add()</a></code>, etc...) them individually. Typically, every object in the tree will have one reference, from its parent. When you are done with the tree of objects, you call <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> on just the root object to free it, which recurses down through any child objects calling <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> on each one of those in turn.</p>
<p>You can get a reference to a single child (<code><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a></code> or <code><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a></code>) and use that object as long as its parent is valid. If you need a child object to live longer than its parent, you can increment the child's refcount (<code><a class="el" href="json__object_8h.html#a675aa3a9cced685dbfd1c1a770a0c3e4">json_object_get()</a></code>) to allow it to survive the parent being freed or it being removed from its parent (<code><a class="el" href="json__object_8h.html#ac6605fdafca20bd5d33c84f4f80a3bda">json_object_object_del()</a></code> or <code><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx()</a></code>)</p> <p>You can get a reference to a single child (<code><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a></code> or <code><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a></code>) and use that object as long as its parent is valid. If you need a child object to live longer than its parent, you can increment the child's refcount (<code><a class="el" href="json__object_8h.html#a675aa3a9cced685dbfd1c1a770a0c3e4">json_object_get()</a></code>) to allow it to survive the parent being freed or it being removed from its parent (<code><a class="el" href="json__object_8h.html#ac6605fdafca20bd5d33c84f4f80a3bda">json_object_object_del()</a></code> or <code><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx()</a></code>)</p>
<p>When parsing text, the <a class="el" href="structjson__tokener.html">json_tokener</a> object is independent from the json_object that it returns. It can be allocated (<code><a class="el" href="json__tokener_8h.html#a5ac7e2c350bc592cf2fa7b9935b00ef5">json_tokener_new()</a></code>) used ones or multiple times (<code><a class="el" href="json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a">json_tokener_parse_ex()</a></code>, and freed (<code><a class="el" href="json__tokener_8h.html#a887c4661906fc6b36cc366304e522534">json_tokener_free()</a></code>) while the json_object objects live on.</p> <p>When parsing text, the <a class="el" href="structjson__tokener.html">json_tokener</a> object is independent from the json_object that it returns. It can be allocated (<code><a class="el" href="json__tokener_8h.html#a5ac7e2c350bc592cf2fa7b9935b00ef5">json_tokener_new()</a></code>) used one or multiple times (<code><a class="el" href="json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a">json_tokener_parse_ex()</a></code>, and freed (<code><a class="el" href="json__tokener_8h.html#a887c4661906fc6b36cc366304e522534">json_tokener_free()</a></code>) while the json_object objects live on.</p>
<p>A json_object tree can be serialized back into a string with <code><a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a></code>. The string that is returned is only valid until the next "to_json_string" call on that same object. Also, it is freed when the json_object is freed. </p> <p>A json_object tree can be serialized back into a string with <code><a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a></code>. The string that is returned is only valid until the next "to_json_string" call on that same object. Also, it is freed when the json_object is freed. </p>
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/issues_closed_for_0.13.md File Reference</title> <title>json-c: issues_closed_for_0.13.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -43,13 +43,13 @@
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="headertitle"> <div class="headertitle">
<div class="title">/home/erh/json-c-0.15/issues_closed_for_0.13.md File Reference</div> </div> <div class="title">issues_closed_for_0.13.md File Reference</div> </div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/issues_closed_for_0.14.md File Reference</title> <title>json-c: issues_closed_for_0.14.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -43,13 +43,13 @@
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="headertitle"> <div class="headertitle">
<div class="title">/home/erh/json-c-0.15/issues_closed_for_0.14.md File Reference</div> </div> <div class="title">issues_closed_for_0.14.md File Reference</div> </div>
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -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.15.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
&#160;<span id="projectnumber">0.16</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&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&#160;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&#160;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.15.md File Reference</div> </div>
</div><!--header-->
<div class="contents">
</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 &#160;<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

@@ -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.16.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
&#160;<span id="projectnumber">0.16</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&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&#160;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&#160;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.16.md File Reference</div> </div>
</div><!--header-->
<div class="contents">
</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 &#160;<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

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json.h File Reference</title> <title>json-c: /home/erh/distcheck/json.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -42,7 +42,7 @@
</div> </div>
<div id="nav-path" class="navpath"> <div id="nav-path" class="navpath">
<ul> <ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul> <li class="navelem"><a class="el" href="dir_b62156a74b5a818be0c2ef9f85294b95.html">distcheck</a></li> </ul>
</div> </div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
@@ -58,7 +58,7 @@
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_c_version.h File Reference</title> <title>json-c: json_c_version.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -61,13 +57,13 @@
Macros</h2></td></tr> Macros</h2></td></tr>
<tr class="memitem:a251c3e1f59a379a4a905382b4e855125"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a251c3e1f59a379a4a905382b4e855125">JSON_C_MAJOR_VERSION</a>&#160;&#160;&#160;0</td></tr> <tr class="memitem:a251c3e1f59a379a4a905382b4e855125"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a251c3e1f59a379a4a905382b4e855125">JSON_C_MAJOR_VERSION</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a251c3e1f59a379a4a905382b4e855125"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a251c3e1f59a379a4a905382b4e855125"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a>&#160;&#160;&#160;15</td></tr> <tr class="memitem:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a>&#160;&#160;&#160;16</td></tr>
<tr class="separator:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:adc87477fbc1c75848fe6b6feec21c2d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64457730097067ab096906d82e4a51a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a64457730097067ab096906d82e4a51a6">JSON_C_MICRO_VERSION</a>&#160;&#160;&#160;0</td></tr> <tr class="memitem:a64457730097067ab096906d82e4a51a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a64457730097067ab096906d82e4a51a6">JSON_C_MICRO_VERSION</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a64457730097067ab096906d82e4a51a6"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a64457730097067ab096906d82e4a51a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78e176eee75ee6aed43c4d65ca4c5b44"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a78e176eee75ee6aed43c4d65ca4c5b44">JSON_C_VERSION_NUM</a>&#160;&#160;&#160;((<a class="el" href="json__c__version_8h.html#a251c3e1f59a379a4a905382b4e855125">JSON_C_MAJOR_VERSION</a> &lt;&lt; 16) | (<a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a> &lt;&lt; 8) | <a class="el" href="json__c__version_8h.html#a64457730097067ab096906d82e4a51a6">JSON_C_MICRO_VERSION</a>)</td></tr> <tr class="memitem:a78e176eee75ee6aed43c4d65ca4c5b44"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a78e176eee75ee6aed43c4d65ca4c5b44">JSON_C_VERSION_NUM</a>&#160;&#160;&#160;((<a class="el" href="json__c__version_8h.html#a251c3e1f59a379a4a905382b4e855125">JSON_C_MAJOR_VERSION</a> &lt;&lt; 16) | (<a class="el" href="json__c__version_8h.html#adc87477fbc1c75848fe6b6feec21c2d6">JSON_C_MINOR_VERSION</a> &lt;&lt; 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">&#160;</td></tr> <tr class="separator:a78e176eee75ee6aed43c4d65ca4c5b44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a894adda66a072bc3fd34ebe91a5aa7f4">JSON_C_VERSION</a>&#160;&#160;&#160;&quot;0.15&quot;</td></tr> <tr class="memitem:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a894adda66a072bc3fd34ebe91a5aa7f4">JSON_C_VERSION</a>&#160;&#160;&#160;&quot;0.16&quot;</td></tr>
<tr class="separator:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a894adda66a072bc3fd34ebe91a5aa7f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a31d5c00f3a4712f2d5d62aee66344e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a>&#160;&#160;&#160;extern</td></tr> <tr class="memitem:a2a31d5c00f3a4712f2d5d62aee66344e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__c__version_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a>&#160;&#160;&#160;extern</td></tr>
<tr class="separator:a2a31d5c00f3a4712f2d5d62aee66344e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a2a31d5c00f3a4712f2d5d62aee66344e"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -111,7 +107,7 @@ Functions</h2></td></tr>
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">#define JSON_C_MINOR_VERSION&#160;&#160;&#160;15</td> <td class="memname">#define JSON_C_MINOR_VERSION&#160;&#160;&#160;16</td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
@@ -123,7 +119,7 @@ Functions</h2></td></tr>
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">#define JSON_C_VERSION&#160;&#160;&#160;&quot;0.15&quot;</td> <td class="memname">#define JSON_C_VERSION&#160;&#160;&#160;&quot;0.16&quot;</td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
@@ -195,7 +191,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_inttypes.h File Reference</title> <title>json-c: json_inttypes.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -107,7 +103,7 @@ Macros</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_object.h File Reference</title> <title>json-c: json_object.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -79,7 +75,9 @@ Macros</h2></td></tr>
<tr class="separator:a5c11d72c55f3ab7c088f19e7bf118163"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a5c11d72c55f3ab7c088f19e7bf118163"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cd01c484155ac99043a35b7c85ae411"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">JSON_C_OBJECT_ADD_KEY_IS_NEW</a>&#160;&#160;&#160;(1 &lt;&lt; 1)</td></tr> <tr class="memitem:a8cd01c484155ac99043a35b7c85ae411"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">JSON_C_OBJECT_ADD_KEY_IS_NEW</a>&#160;&#160;&#160;(1 &lt;&lt; 1)</td></tr>
<tr class="separator:a8cd01c484155ac99043a35b7c85ae411"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a8cd01c484155ac99043a35b7c85ae411"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a134ffafc6116799a20134dc7646b5a37"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a134ffafc6116799a20134dc7646b5a37">JSON_C_OBJECT_KEY_IS_CONSTANT</a>&#160;&#160;&#160;(1 &lt;&lt; 2)</td></tr> <tr class="memitem:a4d303af657ca4ee8e487366ba9692c94"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a4d303af657ca4ee8e487366ba9692c94">JSON_C_OBJECT_ADD_CONSTANT_KEY</a>&#160;&#160;&#160;(1 &lt;&lt; 2)</td></tr>
<tr class="separator:a4d303af657ca4ee8e487366ba9692c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a134ffafc6116799a20134dc7646b5a37"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a134ffafc6116799a20134dc7646b5a37">JSON_C_OBJECT_KEY_IS_CONSTANT</a>&#160;&#160;&#160;<a class="el" href="json__object_8h.html#a4d303af657ca4ee8e487366ba9692c94">JSON_C_OBJECT_ADD_CONSTANT_KEY</a></td></tr>
<tr class="separator:a134ffafc6116799a20134dc7646b5a37"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a134ffafc6116799a20134dc7646b5a37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45837b8c6564f9e605f8a2bc76243750"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a45837b8c6564f9e605f8a2bc76243750">JSON_C_OPTION_GLOBAL</a>&#160;&#160;&#160;(0)</td></tr> <tr class="memitem:a45837b8c6564f9e605f8a2bc76243750"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a45837b8c6564f9e605f8a2bc76243750">JSON_C_OPTION_GLOBAL</a>&#160;&#160;&#160;(0)</td></tr>
<tr class="separator:a45837b8c6564f9e605f8a2bc76243750"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a45837b8c6564f9e605f8a2bc76243750"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -123,8 +121,8 @@ Functions</h2></td></tr>
<tr class="separator:a2caa52ae1863bd073444f3737138a4db"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a2caa52ae1863bd073444f3737138a4db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad59a0ad2ec914a5eef90af53acae06d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ad59a0ad2ec914a5eef90af53acae06d9">json_object_object_length</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr> <tr class="memitem:ad59a0ad2ec914a5eef90af53acae06d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ad59a0ad2ec914a5eef90af53acae06d9">json_object_object_length</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:ad59a0ad2ec914a5eef90af53acae06d9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ad59a0ad2ec914a5eef90af53acae06d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a922b2d76c73da57174beec82d471743b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a922b2d76c73da57174beec82d471743b">JSON_C_CONST_FUNCTION</a> (<a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> size_t json_c_object_sizeof(void))</td></tr> <tr class="memitem:af50be932ec85694ae40141b46901bd00"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#af50be932ec85694ae40141b46901bd00">json_c_object_sizeof</a> (void)</td></tr>
<tr class="separator:a922b2d76c73da57174beec82d471743b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:af50be932ec85694ae40141b46901bd00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27bd808a022251059a43f1f6370441cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a27bd808a022251059a43f1f6370441cd">json_object_object_add</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr> <tr class="memitem:a27bd808a022251059a43f1f6370441cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a27bd808a022251059a43f1f6370441cd">json_object_object_add</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr>
<tr class="separator:a27bd808a022251059a43f1f6370441cd"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a27bd808a022251059a43f1f6370441cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57d3e444dd7db6b4510d21bf3716a002"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a57d3e444dd7db6b4510d21bf3716a002">json_object_object_add_ex</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *const key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *const val, const unsigned opts)</td></tr> <tr class="memitem:a57d3e444dd7db6b4510d21bf3716a002"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a57d3e444dd7db6b4510d21bf3716a002">json_object_object_add_ex</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *const key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *const val, const unsigned opts)</td></tr>
@@ -235,12 +233,25 @@ Variables</h2></td></tr>
<td class="memname">#define JSON_C_CONST_FUNCTION</td> <td class="memname">#define JSON_C_CONST_FUNCTION</td>
<td>(</td> <td>(</td>
<td class="paramtype">&#160;</td> <td class="paramtype">&#160;</td>
<td class="paramname">func </td><td>)</td> <td class="paramname">func</td><td>)</td>
<td>&#160;&#160;&#160;func</td> <td>&#160;&#160;&#160;func</td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a4d303af657ca4ee8e487366ba9692c94"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_OBJECT_ADD_CONSTANT_KEY&#160;&#160;&#160;(1 &lt;&lt; 2)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the json_object_object_add_ex function which flags the key as being constant memory. This means that the key will NOT be copied via strdup(), resulting in a potentially huge performance win (malloc, strdup and free are usually performance hogs). It is acceptable to use this flag for keys in non-constant memory blocks if the caller ensure that the memory holding the key lives longer than the corresponding json object. However, this is somewhat dangerous and should only be done if really justified. The general use-case for this flag is cases where the key is given as a real constant value in the function call, e.g. as in json_object_object_add_ex(obj, "ip", json, JSON_C_OBJECT_ADD_CONSTANT_KEY); </p>
</div> </div>
</div> </div>
<a class="anchor" id="a8cd01c484155ac99043a35b7c85ae411"></a> <a class="anchor" id="a8cd01c484155ac99043a35b7c85ae411"></a>
@@ -261,11 +272,11 @@ Variables</h2></td></tr>
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">#define JSON_C_OBJECT_KEY_IS_CONSTANT&#160;&#160;&#160;(1 &lt;&lt; 2)</td> <td class="memname">#define JSON_C_OBJECT_KEY_IS_CONSTANT&#160;&#160;&#160;<a class="el" href="json__object_8h.html#a4d303af657ca4ee8e487366ba9692c94">JSON_C_OBJECT_ADD_CONSTANT_KEY</a></td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>A flag for the json_object_object_add_ex function which flags the key as being constant memory. This means that the key will NOT be copied via strdup(), resulting in a potentially huge performance win (malloc, strdup and free are usually performance hogs). It is acceptable to use this flag for keys in non-constant memory blocks if the caller ensure that the memory holding the key lives longer than the corresponding json object. However, this is somewhat dangerous and should only be done if really justified. The general use-case for this flag is cases where the key is given as a real constant value in the function call, e.g. as in json_object_object_add_ex(obj, "ip", json, JSON_C_OBJECT_KEY_IS_CONSTANT); </p> <p>This flag is an alias to JSON_C_OBJECT_ADD_CONSTANT_KEY. Historically, this flag was used first and the new name JSON_C_OBJECT_ADD_CONSTANT_KEY was introduced for version 0.16.00 in order to have regular naming. Use of this flag is now legacy. </p>
</div> </div>
</div> </div>
@@ -346,7 +357,7 @@ Variables</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </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>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>See the "Two Space Tab" option at <a href="http://jsonformatter.curiousconcept.com/">http://jsonformatter.curiousconcept.com/</a> for an example of the format. </p> <p>See the "Two Space Tab" option at <a href="https://jsonformatter.curiousconcept.com/">https://jsonformatter.curiousconcept.com/</a> for an example of the format. </p>
</div> </div>
</div> </div>
@@ -422,10 +433,10 @@ Variables</h2></td></tr>
<div class="line"> struct <a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *val = NULL; \</div> <div class="line"> struct <a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *val = NULL; \</div>
<div class="line"> struct <a class="code" href="structlh__entry.html">lh_entry</a> *entry##key; \</div> <div class="line"> struct <a class="code" href="structlh__entry.html">lh_entry</a> *entry##key; \</div>
<div class="line"> struct <a class="code" href="structlh__entry.html">lh_entry</a> *entry_next##key = NULL; \</div> <div class="line"> struct <a class="code" href="structlh__entry.html">lh_entry</a> *entry_next##key = NULL; \</div>
<div class="line"> for (entry##key = <a class="code" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a>(obj)-&gt;head; \</div> <div class="line"> for (entry##key = <a class="code" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a>(<a class="code" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a>(obj)); \</div>
<div class="line"> (entry##key ? (key = (<span class="keywordtype">char</span> *)<a class="code" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">lh_entry_k</a>(entry##key), \</div> <div class="line"> (entry##key ? (key = (<span class="keywordtype">char</span> *)<a class="code" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">lh_entry_k</a>(entry##key), \</div>
<div class="line"> val = (<span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *)<a class="code" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">lh_entry_v</a>(entry##key), \</div> <div class="line"> val = (<span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *)<a class="code" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">lh_entry_v</a>(entry##key), \</div>
<div class="line"> entry_next##key = entry##key-&gt;next, entry##key) \</div> <div class="line"> entry_next##key = <a class="code" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a>(entry##key), entry##key) \</div>
<div class="line"> : 0); \</div> <div class="line"> : 0); \</div>
<div class="line"> entry##key = entry_next##key)</div> <div class="line"> entry##key = entry_next##key)</div>
</div><!-- fragment --><p>Iterate through all keys and values of an object.</p> </div><!-- fragment --><p>Iterate through all keys and values of an object.</p>
@@ -465,11 +476,11 @@ Variables</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">for</span> (iter.entry = <a class="code" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a>(obj)-&gt;head; \</div> <b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">for</span> (iter.entry = <a class="code" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a>(<a class="code" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a>(obj)); \</div>
<div class="line"> (iter.entry ? (iter.key = (<span class="keywordtype">char</span> *)<a class="code" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">lh_entry_k</a>(iter.entry), \</div> <div class="line"> (iter.entry ? (iter.key = (<span class="keywordtype">char</span> *)<a class="code" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">lh_entry_k</a>(iter.entry), \</div>
<div class="line"> iter.val = (<span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *)<a class="code" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">lh_entry_v</a>(iter.entry), iter.entry) \</div> <div class="line"> iter.val = (<span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *)<a class="code" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">lh_entry_v</a>(iter.entry), iter.entry) \</div>
<div class="line"> : 0); \</div> <div class="line"> : 0); \</div>
<div class="line"> iter.entry = iter.entry-&gt;next)</div> <div class="line"> iter.entry = <a class="code" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a>(iter.entry))</div>
</div><!-- fragment --><p>Iterate through all keys and values of an object (ANSI C Safe) </p> </div><!-- fragment --><p>Iterate through all keys and values of an object (ANSI C Safe) </p>
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
@@ -499,15 +510,15 @@ Variables</h2></td></tr>
</div> </div>
</div> </div>
<h2 class="groupheader">Function Documentation</h2> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a922b2d76c73da57174beec82d471743b"></a> <a class="anchor" id="af50be932ec85694ae40141b46901bd00"></a>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
<table class="memname"> <table class="memname">
<tr> <tr>
<td class="memname">JSON_C_CONST_FUNCTION </td> <td class="memname">size_t json_c_object_sizeof </td>
<td>(</td> <td>(</td>
<td class="paramtype"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> size_t &#160;</td> <td class="paramtype">void&#160;</td>
<td class="paramname"><em>json_c_object_sizeof</em>void</td><td>)</td> <td class="paramname"></td><td>)</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
@@ -897,7 +908,7 @@ Variables</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the copy went well, -1 if an error occured during copy or if the destination pointer is non-NULL </dd></dl> <dl class="section return"><dt>Returns</dt><dd>0 if the copy went well, -1 if an error occurred during copy or if the destination pointer is non-NULL </dd></dl>
</div> </div>
</div> </div>
@@ -1022,7 +1033,7 @@ Variables</h2></td></tr>
<ul> <ul>
<li>Using an object field or array index (retrieved through <code><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a></code> or <code><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a></code>) beyond the lifetime of the parent object.</li> <li>Using an object field or array index (retrieved through <code><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a></code> or <code><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a></code>) beyond the lifetime of the parent object.</li>
<li>Detaching an object field or array index from its parent object (using <code><a class="el" href="json__object_8h.html#ac6605fdafca20bd5d33c84f4f80a3bda">json_object_object_del()</a></code> or <code><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx()</a></code>)</li> <li>Detaching an object field or array index from its parent object (using <code><a class="el" href="json__object_8h.html#ac6605fdafca20bd5d33c84f4f80a3bda">json_object_object_del()</a></code> or <code><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx()</a></code>)</li>
<li>Sharing a json_object with multiple (not necesarily parallel) threads of execution that all expect to free it (with <code><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a></code>) when they're done.</li> <li>Sharing a json_object with multiple (not necessarily parallel) threads of execution that all expect to free it (with <code><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a></code>) when they're done.</li>
</ul> </ul>
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
@@ -1084,7 +1095,7 @@ Variables</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Get the json_bool value of a json_object</p> <p>Get the json_bool value of a json_object</p>
<p>The type is coerced to a json_bool if the passed object is not a json_bool. integer and double objects will return 0 if there value is zero or 1 otherwise. If the passed object is a string it will return 1 if it has a non zero length. If any other object type is passed 1 will be returned if the object is not NULL.</p> <p>The type is coerced to a json_bool if the passed object is not a json_bool. integer and double objects will return 0 if there value is zero or 1 otherwise. If the passed object is a string it will return 1 if it has a non zero length. If any other object type is passed 0 will be returned, even non-empty json_type_array and json_type_object objects.</p>
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr> <tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
@@ -1365,7 +1376,7 @@ Variables</h2></td></tr>
</table> </table>
</dd> </dd>
</dl> </dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the increment succeded, 0 otherwise </dd></dl> <dl class="section return"><dt>Returns</dt><dd>1 if the increment succeeded, 0 otherwise </dd></dl>
</div> </div>
</div> </div>
@@ -2591,7 +2602,7 @@ Variables</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_object_iterator.h File Reference</title> <title>json-c: json_object_iterator.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -330,7 +326,7 @@ User and internal code MUST NOT make any assumptions about and dependencies on t
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_pointer.h File Reference</title> <title>json-c: json_pointer.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -264,7 +260,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_tokener.h File Reference</title> <title>json-c: json_tokener.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -682,7 +678,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_types.h File Reference</title> <title>json-c: json_types.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -226,7 +222,7 @@ Enumerations</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_util.h File Reference</title> <title>json-c: json_util.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -469,7 +465,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/json_visit.h File Reference</title> <title>json-c: json_visit.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -235,7 +231,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/linkhash.h File Reference</title> <title>json-c: linkhash.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -80,14 +76,10 @@ Macros</h2></td></tr>
<tr class="separator:ac32e80138c5be6dd9b0483a9cbcc8799"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ac32e80138c5be6dd9b0483a9cbcc8799"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62316f34fd42941b97a8e9a6b6e68faa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a62316f34fd42941b97a8e9a6b6e68faa">JSON_C_STR_HASH_PERLLIKE</a>&#160;&#160;&#160;1</td></tr> <tr class="memitem:a62316f34fd42941b97a8e9a6b6e68faa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a62316f34fd42941b97a8e9a6b6e68faa">JSON_C_STR_HASH_PERLLIKE</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a62316f34fd42941b97a8e9a6b6e68faa"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a62316f34fd42941b97a8e9a6b6e68faa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7dd67da915065dce2c6f44cb03e2d82"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#ad7dd67da915065dce2c6f44cb03e2d82">lh_foreach</a>(table, entry)&#160;&#160;&#160;for (entry = table-&gt;head; entry; entry = entry-&gt;next)</td></tr> <tr class="memitem:ad7dd67da915065dce2c6f44cb03e2d82"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#ad7dd67da915065dce2c6f44cb03e2d82">lh_foreach</a>(table, entry)&#160;&#160;&#160;for (entry = <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a>(table); entry; entry = <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a>(entry))</td></tr>
<tr class="separator:ad7dd67da915065dce2c6f44cb03e2d82"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ad7dd67da915065dce2c6f44cb03e2d82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcbb0df08b4976d0649b826b6bacfca1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#abcbb0df08b4976d0649b826b6bacfca1">lh_foreach_safe</a>(table, entry, tmp)&#160;&#160;&#160;for (entry = table-&gt;head; entry &amp;&amp; ((tmp = entry-&gt;next) || 1); entry = tmp)</td></tr> <tr class="memitem:abcbb0df08b4976d0649b826b6bacfca1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#abcbb0df08b4976d0649b826b6bacfca1">lh_foreach_safe</a>(table, entry, tmp)&#160;&#160;&#160;for (entry = <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a>(table); entry &amp;&amp; ((tmp = <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a>(entry)) || 1); entry = tmp)</td></tr>
<tr class="separator:abcbb0df08b4976d0649b826b6bacfca1"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:abcbb0df08b4976d0649b826b6bacfca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7579ce28b8366fc9b8656f14270aa3aa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">lh_entry_k</a>(entry)&#160;&#160;&#160;_LH_UNCONST((entry)-&gt;k)</td></tr>
<tr class="separator:a7579ce28b8366fc9b8656f14270aa3aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d4052ccfd8c5d351a9c1d3ba07671b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">lh_entry_v</a>(entry)&#160;&#160;&#160;_LH_UNCONST((entry)-&gt;v)</td></tr>
<tr class="separator:a0d4052ccfd8c5d351a9c1d3ba07671b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr> Typedefs</h2></td></tr>
@@ -130,6 +122,22 @@ Functions</h2></td></tr>
<tr class="separator:ac9ba631c91fe80fb905f04c7cd526f2b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:ac9ba631c91fe80fb905f04c7cd526f2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30c8414e31aeee7669acc938116d933f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a30c8414e31aeee7669acc938116d933f">lh_table_resize</a> (struct <a class="el" href="structlh__table.html">lh_table</a> *t, int new_size)</td></tr> <tr class="memitem:a30c8414e31aeee7669acc938116d933f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a30c8414e31aeee7669acc938116d933f">lh_table_resize</a> (struct <a class="el" href="structlh__table.html">lh_table</a> *t, int new_size)</td></tr>
<tr class="separator:a30c8414e31aeee7669acc938116d933f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a30c8414e31aeee7669acc938116d933f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bacf1f7c40830c20440fd95d493f35f"><td class="memItemLeft" align="right" valign="top">static struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a> (const <a class="el" href="structlh__table.html">lh_table</a> *t)</td></tr>
<tr class="separator:a3bacf1f7c40830c20440fd95d493f35f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33c74c884530d407d0b3baa365238fb4"><td class="memItemLeft" align="right" valign="top">static unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a33c74c884530d407d0b3baa365238fb4">lh_get_hash</a> (const struct <a class="el" href="structlh__table.html">lh_table</a> *t, const void *k)</td></tr>
<tr class="separator:a33c74c884530d407d0b3baa365238fb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82e5d699ba2fd4c520352c003f8554a5"><td class="memItemLeft" align="right" valign="top">static void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">lh_entry_k</a> (const struct <a class="el" href="structlh__entry.html">lh_entry</a> *e)</td></tr>
<tr class="separator:a82e5d699ba2fd4c520352c003f8554a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a724c308f1c606271ea3deb01ed9e3cc9"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">lh_entry_k_is_constant</a> (const struct <a class="el" href="structlh__entry.html">lh_entry</a> *e)</td></tr>
<tr class="separator:a724c308f1c606271ea3deb01ed9e3cc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab163f65568af863f3738ccd05900745e"><td class="memItemLeft" align="right" valign="top">static void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">lh_entry_v</a> (const struct <a class="el" href="structlh__entry.html">lh_entry</a> *e)</td></tr>
<tr class="separator:ab163f65568af863f3738ccd05900745e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad94e87a8ef92ee6371e5314b7241e635"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#ad94e87a8ef92ee6371e5314b7241e635">lh_entry_set_val</a> (struct <a class="el" href="structlh__entry.html">lh_entry</a> *e, void *newval)</td></tr>
<tr class="separator:ad94e87a8ef92ee6371e5314b7241e635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a603f6f2cc6d292a160b09b357c7a0a69"><td class="memItemLeft" align="right" valign="top">static struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a> (const struct <a class="el" href="structlh__entry.html">lh_entry</a> *e)</td></tr>
<tr class="separator:a603f6f2cc6d292a160b09b357c7a0a69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a965145d36d3e00eae825c692205d2f81"><td class="memItemLeft" align="right" valign="top">static struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">lh_entry_prev</a> (const struct <a class="el" href="structlh__entry.html">lh_entry</a> *e)</td></tr>
<tr class="separator:a965145d36d3e00eae825c692205d2f81"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>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. </p> <div class="textblock"><p>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. </p>
@@ -171,42 +179,6 @@ Functions</h2></td></tr>
</div><div class="memdoc"> </div><div class="memdoc">
<p>sentinel pointer value for empty slots </p> <p>sentinel pointer value for empty slots </p>
</div>
</div>
<a class="anchor" id="a7579ce28b8366fc9b8656f14270aa3aa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define lh_entry_k</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">entry</td><td>)</td>
<td>&#160;&#160;&#160;_LH_UNCONST((entry)-&gt;k)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a non-const version of <a class="el" href="structlh__entry.html#a79d9f1ef0dc444e17105aaeaf167e22c">lh_entry.k</a>.</p>
<p><a class="el" href="structlh__entry.html#a79d9f1ef0dc444e17105aaeaf167e22c">lh_entry.k</a> is const to indicate and help ensure that linkhash itself doesn't modify it, but callers are allowed to do what they want with it. See also <a class="el" href="structlh__entry.html#a14f40cc124c32b03f81151ae7934d2e7">lh_entry.k_is_constant</a> </p>
</div>
</div>
<a class="anchor" id="a0d4052ccfd8c5d351a9c1d3ba07671b3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define lh_entry_v</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">entry</td><td>)</td>
<td>&#160;&#160;&#160;_LH_UNCONST((entry)-&gt;v)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a non-const version of <a class="el" href="structlh__entry.html#a1b676732ab2ad3eeaedf6ec60a6a0835">lh_entry.v</a>.</p>
<p>v is const to indicate and help ensure that linkhash itself doesn't modify it, but callers are allowed to do what they want with it. </p>
</div> </div>
</div> </div>
<a class="anchor" id="ad7dd67da915065dce2c6f44cb03e2d82"></a> <a class="anchor" id="ad7dd67da915065dce2c6f44cb03e2d82"></a>
@@ -228,7 +200,7 @@ Functions</h2></td></tr>
<tr> <tr>
<td></td> <td></td>
<td>)</td> <td>)</td>
<td></td><td>&#160;&#160;&#160;for (entry = table-&gt;head; entry; entry = entry-&gt;next)</td> <td></td><td>&#160;&#160;&#160;for (entry = <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a>(table); entry; entry = <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a>(entry))</td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
@@ -261,7 +233,7 @@ Functions</h2></td></tr>
<tr> <tr>
<td></td> <td></td>
<td>)</td> <td>)</td>
<td></td><td>&#160;&#160;&#160;for (entry = table-&gt;head; entry &amp;&amp; ((tmp = entry-&gt;next) || 1); entry = tmp)</td> <td></td><td>&#160;&#160;&#160;for (entry = <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head</a>(table); entry &amp;&amp; ((tmp = <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next</a>(entry)) || 1); entry = tmp)</td>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
@@ -385,6 +357,234 @@ Functions</h2></td></tr>
<p>This function sets the hash function to be used for strings. Must be one of the JSON_C_STR_HASH_* values. </p> <p>This function sets the hash function to be used for strings. Must be one of the JSON_C_STR_HASH_* values. </p>
<dl class="section return"><dt>Returns</dt><dd>0 - ok, -1 if parameter was invalid </dd></dl> <dl class="section return"><dt>Returns</dt><dd>0 - ok, -1 if parameter was invalid </dd></dl>
</div>
</div>
<a class="anchor" id="a82e5d699ba2fd4c520352c003f8554a5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void* lh_entry_k </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td>
<td class="paramname"><em>e</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a non-const version of <a class="el" href="structlh__entry.html#a79d9f1ef0dc444e17105aaeaf167e22c">lh_entry.k</a>.</p>
<p><a class="el" href="structlh__entry.html#a79d9f1ef0dc444e17105aaeaf167e22c">lh_entry.k</a> is const to indicate and help ensure that linkhash itself doesn't modify it, but callers are allowed to do what they want with it. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">lh_entry_k_is_constant()</a> </dd></dl>
<p>References <a class="el" href="structlh__entry.html#a79d9f1ef0dc444e17105aaeaf167e22c">lh_entry::k</a>.</p>
</div>
</div>
<a class="anchor" id="a724c308f1c606271ea3deb01ed9e3cc9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int lh_entry_k_is_constant </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td>
<td class="paramname"><em>e</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns 1 if the key for the given entry is constant, and thus does not need to be freed when the <a class="el" href="structlh__entry.html">lh_entry</a> is freed. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="linkhash_8h.html#a4558a9347a422e03a15b0b7a29b82dc3">lh_table_insert_w_hash()</a> </dd></dl>
<p>References <a class="el" href="structlh__entry.html#a14f40cc124c32b03f81151ae7934d2e7">lh_entry::k_is_constant</a>.</p>
</div>
</div>
<a class="anchor" id="a603f6f2cc6d292a160b09b357c7a0a69"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static struct <a class="el" href="structlh__entry.html">lh_entry</a>* lh_entry_next </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td>
<td class="paramname"><em>e</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the next element, or NULL if there is no next element. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head()</a> </dd>
<dd>
<a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">lh_entry_prev()</a> </dd></dl>
<p>References <a class="el" href="structlh__entry.html#a7c40c46e72d9a0ba071a8d49d535bc67">lh_entry::next</a>.</p>
</div>
</div>
<a class="anchor" id="a965145d36d3e00eae825c692205d2f81"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static struct <a class="el" href="structlh__entry.html">lh_entry</a>* lh_entry_prev </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td>
<td class="paramname"><em>e</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the previous element, or NULL if there is no previous element. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head()</a> </dd>
<dd>
<a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next()</a> </dd></dl>
<p>References <a class="el" href="structlh__entry.html#a6fb9c3de01fb5af67d8d429921cc6a3b">lh_entry::prev</a>.</p>
</div>
</div>
<a class="anchor" id="ad94e87a8ef92ee6371e5314b7241e635"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void lh_entry_set_val </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td>
<td class="paramname"><em>e</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>newval</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Change the value for an entry. The caller is responsible for freeing the previous value. </p>
<p>References <a class="el" href="structlh__entry.html#a1b676732ab2ad3eeaedf6ec60a6a0835">lh_entry::v</a>.</p>
</div>
</div>
<a class="anchor" id="ab163f65568af863f3738ccd05900745e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void* lh_entry_v </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structlh__entry.html">lh_entry</a> *&#160;</td>
<td class="paramname"><em>e</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a non-const version of <a class="el" href="structlh__entry.html#a1b676732ab2ad3eeaedf6ec60a6a0835">lh_entry.v</a>.</p>
<p>v is const to indicate and help ensure that linkhash itself doesn't modify it, but callers are allowed to do what they want with it. </p>
<p>References <a class="el" href="structlh__entry.html#a1b676732ab2ad3eeaedf6ec60a6a0835">lh_entry::v</a>.</p>
</div>
</div>
<a class="anchor" id="a33c74c884530d407d0b3baa365238fb4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static unsigned long lh_get_hash </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structlh__table.html">lh_table</a> *&#160;</td>
<td class="paramname"><em>t</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>k</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the hash of a key for a given table.</p>
<p>This is an extension to support functions that need to calculate the hash several times and allows them to do it just once and then pass in the hash to all utility functions. Depending on use case, this can be a considerable performance improvement. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">t</td><td>the table (used to obtain hash function) </td></tr>
<tr><td class="paramname">k</td><td>a pointer to the key to lookup </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the key's hash </dd></dl>
<p>References <a class="el" href="structlh__table.html#a1488d1a4a320b1a9bb2f441859544be1">lh_table::hash_fn</a>.</p>
</div> </div>
</div> </div>
<a class="anchor" id="a6bf630754affe92612639542a6c49c3f"></a> <a class="anchor" id="a6bf630754affe92612639542a6c49c3f"></a>
@@ -571,6 +771,34 @@ Functions</h2></td></tr>
</dd> </dd>
</dl> </dl>
</div>
</div>
<a class="anchor" id="a3bacf1f7c40830c20440fd95d493f35f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static struct <a class="el" href="structlh__entry.html">lh_entry</a>* lh_table_head </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structlh__table.html">lh_table</a> *&#160;</td>
<td class="paramname"><em>t</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the first entry in the <a class="el" href="structlh__table.html">lh_table</a>. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next()</a> </dd></dl>
<p>References <a class="el" href="structlh__table.html#aa7d986a3b12a9fa47e349713794c30fb">lh_table::head</a>.</p>
</div> </div>
</div> </div>
<a class="anchor" id="a86c0cd547be1e2c2486a73bd58e1352c"></a> <a class="anchor" id="a86c0cd547be1e2c2486a73bd58e1352c"></a>
@@ -657,14 +885,14 @@ Functions</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Insert a record into the table using a precalculated key hash.</p> <p>Insert a record into the table using a precalculated key hash.</p>
<p>The hash h, which should be calculated with lh_get_hash() on k, is provided by the caller, to allow for optimization when multiple operations with the same key are known to be needed.</p> <p>The hash h, which should be calculated with <a class="el" href="linkhash_8h.html#a33c74c884530d407d0b3baa365238fb4">lh_get_hash()</a> on k, is provided by the caller, to allow for optimization when multiple operations with the same key are known to be needed.</p>
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
<tr><td class="paramname">t</td><td>the table to insert into. </td></tr> <tr><td class="paramname">t</td><td>the table to insert into. </td></tr>
<tr><td class="paramname">k</td><td>a pointer to the key to insert. </td></tr> <tr><td class="paramname">k</td><td>a pointer to the key to insert. </td></tr>
<tr><td class="paramname">v</td><td>a pointer to the value to insert. </td></tr> <tr><td class="paramname">v</td><td>a pointer to the value to insert. </td></tr>
<tr><td class="paramname">h</td><td>hash value of the key to insert </td></tr> <tr><td class="paramname">h</td><td>hash value of the key to insert </td></tr>
<tr><td class="paramname">opts</td><td>if set to JSON_C_OBJECT_KEY_IS_CONSTANT, sets <a class="el" href="structlh__entry.html#a14f40cc124c32b03f81151ae7934d2e7">lh_entry.k_is_constant</a> so t's free function knows to avoid freeing the key. </td></tr> <tr><td class="paramname">opts</td><td>if set to JSON_C_OBJECT_ADD_CONSTANT_KEY, sets <a class="el" href="structlh__entry.html#a14f40cc124c32b03f81151ae7934d2e7">lh_entry.k_is_constant</a> so t's free function knows to avoid freeing the key. </td></tr>
</table> </table>
</dd> </dd>
</dl> </dl>
@@ -684,6 +912,7 @@ Functions</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Return the number of entries in the table. </p>
</div> </div>
</div> </div>
@@ -768,7 +997,7 @@ Functions</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Lookup a record in the table using a precalculated key hash.</p> <p>Lookup a record in the table using a precalculated key hash.</p>
<p>The hash h, which should be calculated with lh_get_hash() on k, is provided by the caller, to allow for optimization when multiple operations with the same key are known to be needed.</p> <p>The hash h, which should be calculated with <a class="el" href="linkhash_8h.html#a33c74c884530d407d0b3baa365238fb4">lh_get_hash()</a> on k, is provided by the caller, to allow for optimization when multiple operations with the same key are known to be needed.</p>
<dl class="params"><dt>Parameters</dt><dd> <dl class="params"><dt>Parameters</dt><dd>
<table class="params"> <table class="params">
<tr><td class="paramname">t</td><td>the table to lookup </td></tr> <tr><td class="paramname">t</td><td>the table to lookup </td></tr>
@@ -918,7 +1147,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -43,7 +43,7 @@
<div class="textblock"></div></div><!-- contents --> <div class="textblock"></div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -326,7 +326,7 @@ sed -e's,^\[ *\(.*\)\](https://api.github.com/.*/\([0-9].*\)),[Issue #\2](https:
<li><a href="https://github.com/json-c/json-c/issues/387">Issue #387</a> - doc: Use other doxygen feature to specify mainpage \</li> <li><a href="https://github.com/json-c/json-c/issues/387">Issue #387</a> - doc: Use other doxygen feature to specify mainpage \</li>
<li><a href="https://github.com/json-c/json-c/issues/388">Issue #388</a> - json_object: Add size_t json_object_sizeof() \</li> <li><a href="https://github.com/json-c/json-c/issues/388">Issue #388</a> - json_object: Add size_t json_object_sizeof() \</li>
<li><a href="https://github.com/json-c/json-c/issues/389">Issue #389</a> - json_object: Avoid double free (and thus a segfault) when ref_count gets &lt; 0 \</li> <li><a href="https://github.com/json-c/json-c/issues/389">Issue #389</a> - json_object: Avoid double free (and thus a segfault) when ref_count gets &lt; 0 \</li>
<li><a href="https://github.com/json-c/json-c/issues/390">Issue #390</a> - json_object: Add const size_t json_c_object_sizeof() \</li> <li><a href="https://github.com/json-c/json-c/issues/390">Issue #390</a> - json_object: Add const size_t <a class="el" href="json__object_8h.html#af50be932ec85694ae40141b46901bd00">json_c_object_sizeof()</a> \</li>
<li><a href="https://github.com/json-c/json-c/issues/391">Issue #391</a> - Fix non-GNUC define for JSON_C_CONST_FUNCTION \</li> <li><a href="https://github.com/json-c/json-c/issues/391">Issue #391</a> - Fix non-GNUC define for JSON_C_CONST_FUNCTION \</li>
<li><a href="https://github.com/json-c/json-c/issues/392">Issue #392</a> - json_object: Avoid invalid free (and thus a segfault) when ref_count gets &lt; 0 \</li> <li><a href="https://github.com/json-c/json-c/issues/392">Issue #392</a> - json_object: Avoid invalid free (and thus a segfault) when ref_count gets &lt; 0 \</li>
<li><a href="https://github.com/json-c/json-c/issues/393">Issue #393</a> - json_object_private: Use unsigned 32-bit integer type for refcount \</li> <li><a href="https://github.com/json-c/json-c/issues/393">Issue #393</a> - json_object_private: Use unsigned 32-bit integer type for refcount \</li>
@@ -499,12 +499,195 @@ sed -e's,^\[ *\(.*\)\](https://api.github.com/.*/\([0-9].*\)),[Issue #\2](https:
<li><a href="https://github.com/json-c/json-c/issues/578">Issue #578</a> - CMake: Install pkgconfig file in proper location by default \</li> <li><a href="https://github.com/json-c/json-c/issues/578">Issue #578</a> - CMake: Install pkgconfig file in proper location by default \</li>
<li><a href="https://github.com/json-c/json-c/issues/579">Issue #579</a> - Enforce strict prototypes. \</li> <li><a href="https://github.com/json-c/json-c/issues/579">Issue #579</a> - Enforce strict prototypes. \</li>
<li><a href="https://github.com/json-c/json-c/issues/580">Issue #580</a> - Fix CMake tests for enforced strict prototypes. \</li> <li><a href="https://github.com/json-c/json-c/issues/580">Issue #580</a> - Fix CMake tests for enforced strict prototypes. \</li>
<li><a href="https://github.com/json-c/json-c/issues/581">Issue #581</a> - CMakeLists: do not enforce strict prototypes on Windows. \ </li> <li><a href="https://github.com/json-c/json-c/issues/581">Issue #581</a> - CMakeLists: do not enforce strict prototypes on Windows. \</li>
</ul>
<p>This list was created with: </p>
<pre class="fragment">curl "https://api.github.com/search/issues?q=repo%3Ajson-c%2Fjson-c+closed%3A&gt;2020-04-18+created%3A&lt;2020-07-23&amp;sort=created&amp;order=asc&amp;per_page=100&amp;page=1" &gt; issues1.out
jq -r '.items[] | "[" + .title + "](" + .url + ")" | tostring' issues?.out &gt; 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
#... manual editing ...
</pre><hr/>
<p>Issues and Pull Requests closed for the 0.15 release (since commit 31ab57ca, the 0.14 branch point, 2020-04-19)</p>
<ul>
<li><a href="https://github.com/json-c/json-c/issues/428">Issue #428</a> - Added new_null() function</li>
<li><a href="https://github.com/json-c/json-c/issues/429">Issue #429</a> - Conflict of interest between JSON_C_TO_STRING_SPACED and JSON_C_TO_STRING_PRETTY</li>
<li><a href="https://github.com/json-c/json-c/issues/451">Issue #451</a> - Add option to disable HAVE___THREAD</li>
<li><a href="https://github.com/json-c/json-c/issues/471">Issue #471</a> - create folders with mode 0755 when building</li>
<li><a href="https://github.com/json-c/json-c/issues/476">Issue #476</a> - Add new function named json_object_new_string_noalloc</li>
<li><a href="https://github.com/json-c/json-c/issues/484">Issue #484</a> - Add support for uint64</li>
<li><a href="https://github.com/json-c/json-c/issues/487">Issue #487</a> - Any plans to make new release? (0.14)</li>
<li><a href="https://github.com/json-c/json-c/issues/493">Issue #493</a> - Kdopen rename library</li>
<li><a href="https://github.com/json-c/json-c/issues/507">Issue #507</a> - Double value -1.0 converts to integer in <a class="el" href="json__object_8h.html#ab7390c22baa1700d977c2af6b22d43a4">json_object_to_json_string()</a></li>
<li><a href="https://github.com/json-c/json-c/issues/508">Issue #508</a> - Recommend enabling the <code>-fPIC</code> compiler flag by default</li>
<li><a href="https://github.com/json-c/json-c/issues/517">Issue #517</a> - Lja mods</li>
<li><a href="https://github.com/json-c/json-c/issues/534">Issue #534</a> - Both json-c and json-glib have <a class="el" href="json__object_8h.html#af256a3a7910e271a2b9735e5044c3827">json_object_get_type()</a></li>
<li><a href="https://github.com/json-c/json-c/issues/584">Issue #584</a> - CMake: SOVERSION and the major library VERSION need to be in lockstep.</li>
<li><a href="https://github.com/json-c/json-c/issues/585">Issue #585</a> - CMake: Do not install config.h, as it is not a public header file.</li>
<li><a href="https://github.com/json-c/json-c/issues/586">Issue #586</a> - 10796 Segmentation fault</li>
<li><a href="https://github.com/json-c/json-c/issues/588">Issue #588</a> - Broken RDRAND causes infinite looping</li>
<li><a href="https://github.com/json-c/json-c/issues/589">Issue #589</a> - Detect broken RDRAND during initialization</li>
<li><a href="https://github.com/json-c/json-c/issues/590">Issue #590</a> - Fix segmentation fault in CPUID check</li>
<li><a href="https://github.com/json-c/json-c/issues/591">Issue #591</a> - Update <a class="el" href="README_8md.html">README.md</a></li>
<li><a href="https://github.com/json-c/json-c/issues/592">Issue #592</a> - Prevent out of boundary write on malicious input</li>
<li><a href="https://github.com/json-c/json-c/issues/593">Issue #593</a> - Building both static and shared libraries</li>
<li><a href="https://github.com/json-c/json-c/issues/594">Issue #594</a> - Some subsequent call of lh_get_hash not working</li>
<li><a href="https://github.com/json-c/json-c/issues/595">Issue #595</a> - Support to build both static and shared libraries</li>
<li><a href="https://github.com/json-c/json-c/issues/596">Issue #596</a> - QA Notice: Package triggers severe warnings</li>
<li><a href="https://github.com/json-c/json-c/issues/597">Issue #597</a> - json_parse demo: fix and use usage() function</li>
<li><a href="https://github.com/json-c/json-c/issues/598">Issue #598</a> - Turning off shared libs causes target duplication or build error</li>
<li><a href="https://github.com/json-c/json-c/issues/599">Issue #599</a> - cannot add more than 11 objects. Is this a known issue?</li>
<li><a href="https://github.com/json-c/json-c/issues/600">Issue #600</a> - Library name conflicts on Windows are back again</li>
<li><a href="https://github.com/json-c/json-c/issues/601">Issue #601</a> - <a class="el" href="json__tokener_8h.html#a236ef64d079822a4411d13eae7190c4d">json_tokener_parse()</a> in master sets errno=1 "Operation not permitted"</li>
<li><a href="https://github.com/json-c/json-c/issues/602">Issue #602</a> - fix <a class="el" href="json__util_8h.html#a94c2340c1344d57f7aa067f2dd0407f9">json_parse_uint64()</a> internal error checking with errno</li>
<li><a href="https://github.com/json-c/json-c/issues/603">Issue #603</a> - Backport of fixes from master branch.</li>
<li><a href="https://github.com/json-c/json-c/issues/604">Issue #604</a> - commit f2e991a3419ee4078e8915e840b1a0d9003b349e breaks cross-compilation with mingw</li>
<li><a href="https://github.com/json-c/json-c/issues/605">Issue #605</a> - Update to 0.15 release</li>
<li><a href="https://github.com/json-c/json-c/issues/606">Issue #606</a> - Improved support for IBM operating systems</li>
<li><a href="https://github.com/json-c/json-c/issues/607">Issue #607</a> - json-c-0.13.x: 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/608">Issue #608</a> - json-c-0.14: 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/609">Issue #609</a> - use unsigned types for sizes in <a class="el" href="structlh__table.html">lh_table</a> and entries</li>
<li><a href="https://github.com/json-c/json-c/issues/610">Issue #610</a> - let's not call lh_table_resize with INT_MAX</li>
<li><a href="https://github.com/json-c/json-c/issues/611">Issue #611</a> - json-c-0.12.x: 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/613">Issue #613</a> - json-c-0.10: 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/614">Issue #614</a> - Prevent truncation on custom double formatters.</li>
<li><a href="https://github.com/json-c/json-c/issues/615">Issue #615</a> - New release with security fix</li>
<li><a href="https://github.com/json-c/json-c/issues/616">Issue #616</a> - Parsing fails if UTF-16 low surrogate pair is not in same chunk is the high pair</li>
<li><a href="https://github.com/json-c/json-c/issues/617">Issue #617</a> - Add an option to disable the use of thread-local storage.</li>
<li><a href="https://github.com/json-c/json-c/issues/618">Issue #618</a> - test_deep_copy: Fix assertion value.</li>
<li><a href="https://github.com/json-c/json-c/issues/619">Issue #619</a> - CMake: Fix out-of-tree build for Doxygen documentation.</li>
<li><a href="https://github.com/json-c/json-c/issues/621">Issue #621</a> - json-c and jansson libraries have symbol conflicts</li>
<li><a href="https://github.com/json-c/json-c/issues/622">Issue #622</a> - doc: Move Doxyfile into doc subdir.</li>
<li><a href="https://github.com/json-c/json-c/issues/623">Issue #623</a> - json_tokener_parse : Segmentation fault</li>
<li><a href="https://github.com/json-c/json-c/issues/626">Issue #626</a> - Fixes for cmake 2.8.12 + link issue on AIX 6.1/cc 11.01</li>
<li><a href="https://github.com/json-c/json-c/issues/627">Issue #627</a> - Compat fixes</li>
<li><a href="https://github.com/json-c/json-c/issues/628">Issue #628</a> - get_cryptgenrandom_seed: compat with old windows + fallback</li>
<li><a href="https://github.com/json-c/json-c/issues/629">Issue #629</a> - [0.12] Remove the Visual Studio project file</li>
<li><a href="https://github.com/json-c/json-c/issues/630">Issue #630</a> - Linking with Windows MINGW not working</li>
<li><a href="https://github.com/json-c/json-c/issues/632">Issue #632</a> - Json object split</li>
<li><a href="https://github.com/json-c/json-c/issues/633">Issue #633</a> - fix issue 616: support the surrogate pair in split file.</li>
<li><a href="https://github.com/json-c/json-c/issues/634">Issue #634</a> - Issue #508: <code>-fPIC</code> to link libjson-c.a with libs</li>
<li><a href="https://github.com/json-c/json-c/issues/635">Issue #635</a> - expression has no effect warning in json_tokener.c</li>
<li><a href="https://github.com/json-c/json-c/issues/636">Issue #636</a> - json_object_get_string free str memory</li>
<li><a href="https://github.com/json-c/json-c/issues/637">Issue #637</a> - <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> has 'double free or corruption (out) '</li>
<li><a href="https://github.com/json-c/json-c/issues/638">Issue #638</a> - json-c/json_object.c:50:2: error: #error Unable to determine size of ssize_t</li>
<li><a href="https://github.com/json-c/json-c/issues/639">Issue #639</a> - build: Add a symbol version to all exported symbols</li>
<li><a href="https://github.com/json-c/json-c/issues/640">Issue #640</a> - Fix build issues with SSIZE_MAX on 64bit Linux</li>
<li><a href="https://github.com/json-c/json-c/issues/641">Issue #641</a> - Formal verification of your test suite</li>
<li><a href="https://github.com/json-c/json-c/issues/642">Issue #642</a> - Please provide more precise informations about when to call json_object_put</li>
<li><a href="https://github.com/json-c/json-c/issues/643">Issue #643</a> - not able to compare with string</li>
<li><a href="https://github.com/json-c/json-c/issues/644">Issue #644</a> - Why src-&gt;_userdata not checked before calling strdup?</li>
<li><a href="https://github.com/json-c/json-c/issues/645">Issue #645</a> - Misuse of tolower() in json_tokener.c</li>
<li><a href="https://github.com/json-c/json-c/issues/646">Issue #646</a> - Cast to unsigned char instead of int when calling tolower (Fixes #645)</li>
</ul>
<p>This list was created with: </p>
<pre class="fragment">PREV=2020-07-23
NOW=2022-04-13
curl "https://api.github.com/search/issues?q=repo%3Ajson-c%2Fjson-c+closed%3A&gt;${PREV}+created%3A&lt;${NOW}&amp;sort=created&amp;order=asc&amp;per_page=100&amp;page=1" &gt; issues1.out
jq -r '.items[] | "[" + .title + "](" + .url + ")" | tostring' issues?.out &gt; 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 &gt;&gt; issues_closed_for_0.16.md
</pre><ul>
<li><a href="https://github.com/json-c/json-c/issues/464">Issue #464</a> - Speed up parsing and object creation</li>
<li><a href="https://github.com/json-c/json-c/issues/540">Issue #540</a> - request: json_init_library</li>
<li><a href="https://github.com/json-c/json-c/issues/631">Issue #631</a> - New 0.14 release requests</li>
<li><a href="https://github.com/json-c/json-c/issues/647">Issue #647</a> - "cmake -DCMAKE_BUILD_TYPE=Release" fails with error: 'cint64' may be used uninitialized</li>
<li><a href="https://github.com/json-c/json-c/issues/648">Issue #648</a> - Fix "may be used uninitialized" Release build failure</li>
<li><a href="https://github.com/json-c/json-c/issues/649">Issue #649</a> - json-c tag 0.15 tarball contains a file doc/Doxyfile and generated doxygen files in doc/html</li>
<li><a href="https://github.com/json-c/json-c/issues/650">Issue #650</a> - README: fix spelling errors</li>
<li><a href="https://github.com/json-c/json-c/issues/651">Issue #651</a> - Getrandom</li>
<li><a href="https://github.com/json-c/json-c/issues/652">Issue #652</a> - Waste memory</li>
<li><a href="https://github.com/json-c/json-c/issues/653">Issue #653</a> - Make the documentation build reproducibly</li>
<li><a href="https://github.com/json-c/json-c/issues/654">Issue #654</a> - A stack-buffer-overflow in json_parse.c:89:44</li>
<li><a href="https://github.com/json-c/json-c/issues/655">Issue #655</a> - json_parse: Fix read past end of buffer</li>
<li><a href="https://github.com/json-c/json-c/issues/656">Issue #656</a> - Fixed warnings</li>
<li><a href="https://github.com/json-c/json-c/issues/657">Issue #657</a> - Use GRND_NONBLOCK with getrandom.</li>
<li><a href="https://github.com/json-c/json-c/issues/658">Issue #658</a> - <a class="el" href="json__object_8h.html#ac003fb99db7ecd674bb16d983d2f92ee">json_object_get_boolean()</a> returns wrong result for objects and arrays</li>
<li><a href="https://github.com/json-c/json-c/issues/659">Issue #659</a> - fix <a class="el" href="json__object_8h.html#ac003fb99db7ecd674bb16d983d2f92ee">json_object_get_boolean()</a> to behave like documented</li>
<li><a href="https://github.com/json-c/json-c/issues/660">Issue #660</a> - Validate size arguments in arraylist functions.</li>
<li><a href="https://github.com/json-c/json-c/issues/661">Issue #661</a> - Cleanup of some code parts</li>
<li><a href="https://github.com/json-c/json-c/issues/662">Issue #662</a> - Prevent signed overflow in get_time_seed</li>
<li><a href="https://github.com/json-c/json-c/issues/663">Issue #663</a> - Properly format errnos in <em>json_c_strerror</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/664">Issue #664</a> - Limit strings at INT_MAX length</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/665">Issue #665</a> - Handle more allocation failures in json_tokener* functions</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/666">Issue #666</a> - test1 json_object_new_array_ext test is failing</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/667">Issue #667</a> - Fixed test1 regression.</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/670">Issue #670</a> - Created Stone-Paper-Scissor Game by C language</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/672">Issue #672</a> - Calling exit() after failure to generate random seed</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/673">Issue #673</a> - switchcasemenuproject</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/674">Issue #674</a> - random_seed: on error, continue to next method</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/682">Issue #682</a> - libjson-c-dev vs libjson-c3</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/683">Issue #683</a> - [Question] Is it possible to clear a ptr of json_object?</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/684">Issue #684</a> - json_tokener_parse_verbose failed with core dump</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/685">Issue #685</a> - json_tokener_parse memory leak?</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/689">Issue #689</a> - fix compilation with clang</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/690">Issue #690</a> - "1," produces an object with int 1; "1" produces a null object</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/691">Issue #691</a> - failed tests</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/692">Issue #692</a> - patch to add arc4random</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/693">Issue #693</a> - Optional parameter for packing as array</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/694">Issue #694</a> - fix invalid unsigned arithmetic.</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/695">Issue #695</a> - /tmp/json-c/random_seed.c:327:6: error</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/696">Issue #696</a> - To avoid target exe file export JSON functions.</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/697">Issue #697</a> - <a class="el" href="json__object_8h.html#a9ee29ca8d79896e15007131527f6002e">json_object_get_string()</a> return value truncated when assigning it to a pointer type in Win32 App</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/698">Issue #698</a> - Feature request: set allocator</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/699">Issue #699</a> - Linking to libjson-c Issue</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/700">Issue #700</a> - Fix unused variable for Win32 build in random_seed.c</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/701">Issue #701</a> - [RFC] json_pointer: allow the feature to be disabled</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/703">Issue #703</a> - Fix vasprintf fallback</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/706">Issue #706</a> - Check <b>STDC_VERSION</b> is defined before checking its value</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/707">Issue #707</a> - How to build json-c-0.15 for arm arch</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/708">Issue #708</a> - direct access to elements</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/709">Issue #709</a> - Include guards not namespaced / build errors for debug.h with openNDS</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/710">Issue #710</a> - 'file system sandbox blocked mmap()' error on iOS</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/711">Issue #711</a> - creating a json object</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/712">Issue #712</a> - building json-c using cmake for ESP32</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/713">Issue #713</a> - When value converted to char* can not compare it with another value</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/714">Issue #714</a> - Add AfterCaseLabel to .clang-format</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/716">Issue #716</a> - Fixed cmake command</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/717">Issue #717</a> - Cmake is able delete all files by "clean" target</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/718">Issue #718</a> - CMake create uninstall target if unix generator is used</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/719">Issue #719</a> - Parsing multiple JSON strings</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/722">Issue #722</a> - Fix use-after-free in <a class="el" href="json__tokener_8h.html#a6a1583ddd434e13515d6232de813462e">json_tokener_new_ex()</a></em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/723">Issue #723</a> - if set __stdcall (/Gz)</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/724">Issue #724</a> - #723</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/725">Issue #725</a> - <a class="el" href="json__util_8h.html#a03119ec0a71af4eee95318e9b2aaf05b">json_object_from_file()</a> execution segment error</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/726">Issue #726</a> - fix cmake version for tests</em></li>
<li><em><a href="https://github.com/json-c/json-c/issues/727">Issue #727</a> - Really use prefix JSON_C_OBJECT_ADD</em></li>
<li><a href="https://github.com/json-c/json-c/issues/728">Issue #728</a> - DRAFT PROPOSAL - Add option JSON_C_OBJECT_ADD_IF_NOT_NULL</li>
<li><a href="https://github.com/json-c/json-c/issues/729">Issue #729</a> - * don't assume includedir</li>
<li><a href="https://github.com/json-c/json-c/issues/731">Issue #731</a> - Json-c Error</li>
<li><a href="https://github.com/json-c/json-c/issues/732">Issue #732</a> - Fix/static include dirs</li>
<li><a href="https://github.com/json-c/json-c/issues/734">Issue #734</a> - Newer appveyor config for VS2022 etc...</li>
<li><a href="https://github.com/json-c/json-c/issues/735">Issue #735</a> - Add policy_max to minimum required cmake version</li>
<li><a href="https://github.com/json-c/json-c/issues/736">Issue #736</a> - json_object.c:308: json_object_put: Assertion `jso-&gt;_ref_count &gt; 0' failed</li>
<li><a href="https://github.com/json-c/json-c/issues/737">Issue #737</a> - Fix typo in README</li>
<li><a href="https://github.com/json-c/json-c/issues/738">Issue #738</a> - General question - Is there an SLA for handling newly detected security issues?</li>
<li><a href="https://github.com/json-c/json-c/issues/739">Issue #739</a> - json_escape_str(): avoid harmless unsigned integer overflow</li>
<li><a href="https://github.com/json-c/json-c/issues/741">Issue #741</a> - <a class="el" href="json__util_8h.html#a762aaf3df0a9c7b6919cdc1035348012">json_type_to_name()</a>: use correct printf() formatter</li>
<li><a href="https://github.com/json-c/json-c/issues/742">Issue #742</a> - json_object_copy_serializer_data(): add assertion</li>
<li><a href="https://github.com/json-c/json-c/issues/743">Issue #743</a> - Cmd adb root</li>
<li><a href="https://github.com/json-c/json-c/issues/744">Issue #744</a> - Close file on error path.</li>
<li><a href="https://github.com/json-c/json-c/issues/745">Issue #745</a> - vasprintf(): avoid out of memory accesses</li>
<li><a href="https://github.com/json-c/json-c/issues/746">Issue #746</a> - Fix typos in code comments and ChangeLog</li>
<li><a href="https://github.com/json-c/json-c/issues/747">Issue #747</a> - json_object_put: Assertion `jso-&gt;_ref_count &gt; 0' failed</li>
<li><a href="https://github.com/json-c/json-c/issues/748">Issue #748</a> - <a class="el" href="printbuf_8h.html#a61f6bc0b1ca5787f0faca6799d61a0bb">sprintbuf()</a>: test for all vsnprintf error values</li>
<li><a href="https://github.com/json-c/json-c/issues/749">Issue #749</a> - <a class="el" href="printbuf_8h.html#a61f6bc0b1ca5787f0faca6799d61a0bb">sprintbuf()</a>: handle printbuf_memappend errors</li>
<li><a href="https://github.com/json-c/json-c/issues/750">Issue #750</a> - <a class="el" href="printbuf_8h.html#a93a27f4f8a092c58666724de23ae804d">printbuf_memset()</a>: set gaps to zero</li>
<li><a href="https://github.com/json-c/json-c/issues/751">Issue #751</a> - printbuf: do not allow invalid arguments</li>
<li><a href="https://github.com/json-c/json-c/issues/752">Issue #752</a> - Fix typos</li>
<li><a href="https://github.com/json-c/json-c/issues/753">Issue #753</a> - CTest failed in MSVC build</li>
<li><a href="https://github.com/json-c/json-c/issues/754">Issue #754</a> - Minor improvements to documentation</li>
<li><a href="https://github.com/json-c/json-c/issues/755">Issue #755</a> - Fix error messages</li>
<li><a href="https://github.com/json-c/json-c/issues/758">Issue #758</a> - Preserve context if out of memory</li>
<li><a href="https://github.com/json-c/json-c/issues/760">Issue #760</a> - Code style: removed unneeded double-quotes</li>
<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>
</ul> </ul>
</div></div><!-- contents --> </div></div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -50,7 +50,7 @@
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>json-c: /home/erh/json-c-0.15/printbuf.h File Reference</title> <title>json-c: printbuf.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="dynsections.js"></script>
@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -40,10 +40,6 @@
<li><a href="globals.html"><span>Globals</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li>
</ul> </ul>
</div> </div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top --> </div><!-- top -->
<div class="header"> <div class="header">
<div class="summary"> <div class="summary">
@@ -56,7 +52,7 @@
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<p>Internal string buffer handing. 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. <p>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.
<a href="#details">More...</a></p> <a href="#details">More...</a></p>
<table class="memberdecls"> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
@@ -96,7 +92,7 @@ Functions</h2></td></tr>
<tr class="separator:a2b744266191ef5e3102fbf910e790a98"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a2b744266191ef5e3102fbf910e790a98"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Internal string buffer handing. 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. </p> <div class="textblock"><p>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. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2> </div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a2a31d5c00f3a4712f2d5d62aee66344e"></a> <a class="anchor" id="a2a31d5c00f3a4712f2d5d62aee66344e"></a>
<div class="memitem"> <div class="memitem">
@@ -380,7 +376,7 @@ Functions</h2></td></tr>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -110,12 +110,12 @@ Data Fields</h2></td></tr>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="arraylist_8h.html">arraylist.h</a></li> <li><a class="el" href="arraylist_8h.html">arraylist.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -98,12 +98,12 @@ Data Fields</h2></td></tr>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="json__types_8h.html">json_types.h</a></li> <li><a class="el" href="json__types_8h.html">json_types.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -70,12 +70,12 @@ Data Fields</h2></td></tr>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="json__object__iterator_8h.html">json_object_iterator.h</a></li> <li><a class="el" href="json__object__iterator_8h.html">json_object_iterator.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -241,12 +241,12 @@ Data Fields</h2></td></tr>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="json__tokener_8h.html">json_tokener.h</a></li> <li><a class="el" href="json__tokener_8h.html">json_tokener.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -112,12 +112,12 @@ Data Fields</h2></td></tr>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="json__tokener_8h.html">json_tokener.h</a></li> <li><a class="el" href="json__tokener_8h.html">json_tokener.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -63,7 +63,7 @@ Data Fields</h2></td></tr>
<tr class="separator:a6fb9c3de01fb5af67d8d429921cc6a3b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:a6fb9c3de01fb5af67d8d429921cc6a3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An entry in the hash table </p> <div class="textblock"><p>An entry in the hash table. Outside of linkhash.c, treat this as opaque. </p>
</div><h2 class="groupheader">Field Documentation</h2> </div><h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a79d9f1ef0dc444e17105aaeaf167e22c"></a> <a class="anchor" id="a79d9f1ef0dc444e17105aaeaf167e22c"></a>
<div class="memitem"> <div class="memitem">
@@ -74,7 +74,10 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>The key. Use <a class="el" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">lh_entry_k()</a> instead of accessing this directly. </p> <p>The key. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000011">Deprecated:</a></b></dt><dd>Use <a class="el" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">lh_entry_k()</a> instead of accessing this directly. </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#a82e5d699ba2fd4c520352c003f8554a5">lh_entry_k()</a>.</p>
</div> </div>
</div> </div>
@@ -88,6 +91,9 @@ Data Fields</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>A flag for users of linkhash to know whether or not they need to free k. </p> <p>A flag for users of linkhash to know whether or not they need to free k. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000012">Deprecated:</a></b></dt><dd>use <a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">lh_entry_k_is_constant()</a> instead. </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#a724c308f1c606271ea3deb01ed9e3cc9">lh_entry_k_is_constant()</a>.</p>
</div> </div>
</div> </div>
@@ -100,7 +106,10 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>The next entry </p> <p>The next entry. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000014">Deprecated:</a></b></dt><dd>Use <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next()</a> instead of accessing this directly. </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#a603f6f2cc6d292a160b09b357c7a0a69">lh_entry_next()</a>.</p>
</div> </div>
</div> </div>
@@ -114,6 +123,9 @@ Data Fields</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>The previous entry. </p> <p>The previous entry. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000015">Deprecated:</a></b></dt><dd>Use <a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">lh_entry_prev()</a> instead of accessing this directly. </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#a965145d36d3e00eae825c692205d2f81">lh_entry_prev()</a>.</p>
</div> </div>
</div> </div>
@@ -126,17 +138,20 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>The value. Use <a class="el" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">lh_entry_v()</a> instead of accessing this directly. </p> <p>The value. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000013">Deprecated:</a></b></dt><dd>Use <a class="el" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">lh_entry_v()</a> instead of accessing this directly. </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#ad94e87a8ef92ee6371e5314b7241e635">lh_entry_set_val()</a>, and <a class="el" href="linkhash_8h.html#ab163f65568af863f3738ccd05900745e">lh_entry_v()</a>.</p>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="linkhash_8h.html">linkhash.h</a></li> <li><a class="el" href="linkhash_8h.html">linkhash.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -69,7 +69,7 @@ Data Fields</h2></td></tr>
<tr class="separator:aa646c287a6a46e09da6c7457c981a359"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:aa646c287a6a46e09da6c7457c981a359"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The hash table structure. </p> <div class="textblock"><p>The hash table structure. Outside of linkhash.c, treat this as opaque. </p>
</div><h2 class="groupheader">Field Documentation</h2> </div><h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="aa172ed8fe205367b54e0e2cdf9ea8c6c"></a> <a class="anchor" id="aa172ed8fe205367b54e0e2cdf9ea8c6c"></a>
<div class="memitem"> <div class="memitem">
@@ -81,6 +81,7 @@ Data Fields</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Numbers of entries. </p> <p>Numbers of entries. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000017">Deprecated:</a></b></dt><dd>Use <a class="el" href="linkhash_8h.html#ac9ba631c91fe80fb905f04c7cd526f2b">lh_table_length()</a> instead. </dd></dl>
</div> </div>
</div> </div>
@@ -93,6 +94,7 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000023">Deprecated:</a></b></dt><dd>do not use outside of linkhash.c </dd></dl>
</div> </div>
</div> </div>
@@ -105,7 +107,8 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>A pointer onto the function responsible for freeing an entry. </p> <p>A pointer to the function responsible for freeing an entry. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000021">Deprecated:</a></b></dt><dd>do not use outside of linkhash.c </dd></dl>
</div> </div>
</div> </div>
@@ -118,6 +121,9 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000022">Deprecated:</a></b></dt><dd>do not use outside of linkhash.c </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#a33c74c884530d407d0b3baa365238fb4">lh_get_hash()</a>.</p>
</div> </div>
</div> </div>
@@ -131,6 +137,9 @@ Data Fields</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>The first entry. </p> <p>The first entry. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000018">Deprecated:</a></b></dt><dd>Use <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head()</a> instead. </dd></dl>
<p>Referenced by <a class="el" href="linkhash_8h.html#a3bacf1f7c40830c20440fd95d493f35f">lh_table_head()</a>.</p>
</div> </div>
</div> </div>
@@ -144,6 +153,7 @@ Data Fields</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Size of our hash. </p> <p>Size of our hash. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000016">Deprecated:</a></b></dt><dd>do not use outside of linkhash.c </dd></dl>
</div> </div>
</div> </div>
@@ -156,6 +166,8 @@ Data Fields</h2></td></tr>
</tr> </tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>Internal storage of the actual table of entries. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000020">Deprecated:</a></b></dt><dd>do not use outside of linkhash.c </dd></dl>
</div> </div>
</div> </div>
@@ -169,16 +181,17 @@ Data Fields</h2></td></tr>
</table> </table>
</div><div class="memdoc"> </div><div class="memdoc">
<p>The last entry. </p> <p>The last entry. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000019">Deprecated:</a></b></dt><dd>Do not use, may be removed in a future release. </dd></dl>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="linkhash_8h.html">linkhash.h</a></li> <li><a class="el" href="linkhash_8h.html">linkhash.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -17,7 +17,7 @@
<tr style="height: 56px;"> <tr style="height: 56px;">
<td style="padding-left: 0.5em;"> <td style="padding-left: 0.5em;">
<div id="projectname">json-c <div id="projectname">json-c
&#160;<span id="projectnumber">0.15</span> &#160;<span id="projectnumber">0.16</span>
</div> </div>
</td> </td>
</tr> </tr>
@@ -96,12 +96,12 @@ Data Fields</h2></td></tr>
</div> </div>
</div> </div>
<hr/>The documentation for this struct was generated from the following file:<ul> <hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/erh/json-c-0.15/<a class="el" href="printbuf_8h.html">printbuf.h</a></li> <li><a class="el" href="printbuf_8h.html">printbuf.h</a></li>
</ul> </ul>
</div><!-- contents --> </div><!-- contents -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html"> Generated on Thu Apr 14 2022 01:11:24 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/> <img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2 </a> 1.8.2
</small></address> </small></address>

View File

@@ -5,7 +5,7 @@
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # https://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -7,7 +7,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
const char *data1 = reinterpret_cast<const char *>(data); const char *data1 = reinterpret_cast<const char *>(data);
json_tokener *tok = json_tokener_new(); json_tokener *tok = json_tokener_new();
json_object *obj = json_tokener_parse_ex(tok, data1, size); json_object *obj = json_tokener_parse_ex(tok, data1, size);
json_object_object_foreach(jobj, key, val) {
(void)json_object_get_type(val);
(void)json_object_get_string(val);
}
(void)json_object_to_json_string(obj, JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED);
json_object_put(obj); json_object_put(obj);
json_tokener_free(tok); json_tokener_free(tok);
return 0; return 0;

85
issues_closed_for_0.15.md Normal file
View File

@@ -0,0 +1,85 @@
This list was created with:
```
curl "https://api.github.com/search/issues?q=repo%3Ajson-c%2Fjson-c+closed%3A>2020-04-18+created%3A<2020-07-23&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
#... manual editing ...
```
----
Issues and Pull Requests closed for the 0.15 release
(since commit 31ab57ca, the 0.14 branch point, 2020-04-19)
* [Issue #428](https://github.com/json-c/json-c/issues/428) - Added new_null() function
* [Issue #429](https://github.com/json-c/json-c/issues/429) - Conflict of interest between JSON_C_TO_STRING_SPACED and JSON_C_TO_STRING_PRETTY
* [Issue #451](https://github.com/json-c/json-c/issues/451) - Add option to disable HAVE___THREAD
* [Issue #471](https://github.com/json-c/json-c/issues/471) - create folders with mode 0755 when building
* [Issue #476](https://github.com/json-c/json-c/issues/476) - Add new function named json_object_new_string_noalloc
* [Issue #484](https://github.com/json-c/json-c/issues/484) - Add support for uint64
* [Issue #487](https://github.com/json-c/json-c/issues/487) - Any plans to make new release? (0.14)
* [Issue #493](https://github.com/json-c/json-c/issues/493) - Kdopen rename library
* [Issue #507](https://github.com/json-c/json-c/issues/507) - Double value -1.0 converts to integer in json_object_to_json_string()
* [Issue #508](https://github.com/json-c/json-c/issues/508) - Recommend enabling the `-fPIC` compiler flag by default
* [Issue #517](https://github.com/json-c/json-c/issues/517) - Lja mods
* [Issue #534](https://github.com/json-c/json-c/issues/534) - Both json-c and json-glib have json_object_get_type()
* [Issue #584](https://github.com/json-c/json-c/issues/584) - CMake: SOVERSION and the major library VERSION need to be in lockstep.
* [Issue #585](https://github.com/json-c/json-c/issues/585) - CMake: Do not install config.h, as it is not a public header file.
* [Issue #586](https://github.com/json-c/json-c/issues/586) - 10796 Segmentation fault
* [Issue #588](https://github.com/json-c/json-c/issues/588) - Broken RDRAND causes infinite looping
* [Issue #589](https://github.com/json-c/json-c/issues/589) - Detect broken RDRAND during initialization
* [Issue #590](https://github.com/json-c/json-c/issues/590) - Fix segmentation fault in CPUID check
* [Issue #591](https://github.com/json-c/json-c/issues/591) - Update README.md
* [Issue #592](https://github.com/json-c/json-c/issues/592) - Prevent out of boundary write on malicious input
* [Issue #593](https://github.com/json-c/json-c/issues/593) - Building both static and shared libraries
* [Issue #594](https://github.com/json-c/json-c/issues/594) - Some subsequent call of lh_get_hash not working
* [Issue #595](https://github.com/json-c/json-c/issues/595) - Support to build both static and shared libraries
* [Issue #596](https://github.com/json-c/json-c/issues/596) - QA Notice: Package triggers severe warnings
* [Issue #597](https://github.com/json-c/json-c/issues/597) - json_parse demo: fix and use usage() function
* [Issue #598](https://github.com/json-c/json-c/issues/598) - Turning off shared libs causes target duplication or build error
* [Issue #599](https://github.com/json-c/json-c/issues/599) - cannot add more than 11 objects. Is this a known issue?
* [Issue #600](https://github.com/json-c/json-c/issues/600) - Library name conflicts on Windows are back again
* [Issue #601](https://github.com/json-c/json-c/issues/601) - json_tokener_parse() in master sets errno=1 "Operation not permitted"
* [Issue #602](https://github.com/json-c/json-c/issues/602) - fix json_parse_uint64() internal error checking with errno
* [Issue #603](https://github.com/json-c/json-c/issues/603) - Backport of fixes from master branch.
* [Issue #604](https://github.com/json-c/json-c/issues/604) - commit f2e991a3419ee4078e8915e840b1a0d9003b349e breaks cross-compilation with mingw
* [Issue #605](https://github.com/json-c/json-c/issues/605) - Update to 0.15 release
* [Issue #606](https://github.com/json-c/json-c/issues/606) - Improved support for IBM operating systems
* [Issue #607](https://github.com/json-c/json-c/issues/607) - json-c-0.13.x: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...
* [Issue #608](https://github.com/json-c/json-c/issues/608) - json-c-0.14: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...
* [Issue #609](https://github.com/json-c/json-c/issues/609) - use unsigned types for sizes in lh_table and entries
* [Issue #610](https://github.com/json-c/json-c/issues/610) - let's not call lh_table_resize with INT_MAX
* [Issue #611](https://github.com/json-c/json-c/issues/611) - json-c-0.12.x: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...
* [Issue #613](https://github.com/json-c/json-c/issues/613) - json-c-0.10: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...
* [Issue #614](https://github.com/json-c/json-c/issues/614) - Prevent truncation on custom double formatters.
* [Issue #615](https://github.com/json-c/json-c/issues/615) - New release with security fix
* [Issue #616](https://github.com/json-c/json-c/issues/616) - Parsing fails if UTF-16 low surrogate pair is not in same chunk is the high pair
* [Issue #617](https://github.com/json-c/json-c/issues/617) - Add an option to disable the use of thread-local storage.
* [Issue #618](https://github.com/json-c/json-c/issues/618) - test_deep_copy: Fix assertion value.
* [Issue #619](https://github.com/json-c/json-c/issues/619) - CMake: Fix out-of-tree build for Doxygen documentation.
* [Issue #621](https://github.com/json-c/json-c/issues/621) - json-c and jansson libraries have symbol conflicts
* [Issue #622](https://github.com/json-c/json-c/issues/622) - doc: Move Doxyfile into doc subdir.
* [Issue #623](https://github.com/json-c/json-c/issues/623) - json_tokener_parse : Segmentation fault
* [Issue #626](https://github.com/json-c/json-c/issues/626) - Fixes for cmake 2.8.12 + link issue on AIX 6.1/cc 11.01
* [Issue #627](https://github.com/json-c/json-c/issues/627) - Compat fixes
* [Issue #628](https://github.com/json-c/json-c/issues/628) - get_cryptgenrandom_seed: compat with old windows + fallback
* [Issue #629](https://github.com/json-c/json-c/issues/629) - [0.12] Remove the Visual Studio project file
* [Issue #630](https://github.com/json-c/json-c/issues/630) - Linking with Windows MINGW not working
* [Issue #632](https://github.com/json-c/json-c/issues/632) - Json object split
* [Issue #633](https://github.com/json-c/json-c/issues/633) - fix issue 616: support the surrogate pair in split file.
* [Issue #634](https://github.com/json-c/json-c/issues/634) - Issue #508: `-fPIC` to link libjson-c.a with libs
* [Issue #635](https://github.com/json-c/json-c/issues/635) - expression has no effect warning in json_tokener.c
* [Issue #636](https://github.com/json-c/json-c/issues/636) - json_object_get_string free str memory
* [Issue #637](https://github.com/json-c/json-c/issues/637) - json_object_put() has 'double free or corruption (out) '
* [Issue #638](https://github.com/json-c/json-c/issues/638) - json-c/json_object.c:50:2: error: #error Unable to determine size of ssize_t
* [Issue #639](https://github.com/json-c/json-c/issues/639) - build: Add a symbol version to all exported symbols
* [Issue #640](https://github.com/json-c/json-c/issues/640) - Fix build issues with SSIZE_MAX on 64bit Linux
* [Issue #641](https://github.com/json-c/json-c/issues/641) - Formal verification of your test suite
* [Issue #642](https://github.com/json-c/json-c/issues/642) - Please provide more precise informations about when to call json_object_put
* [Issue #643](https://github.com/json-c/json-c/issues/643) - not able to compare with string
* [Issue #644](https://github.com/json-c/json-c/issues/644) - Why src->_userdata not checked before calling strdup?
* [Issue #645](https://github.com/json-c/json-c/issues/645) - Misuse of tolower() in json_tokener.c
* [Issue #646](https://github.com/json-c/json-c/issues/646) - Cast to unsigned char instead of int when calling tolower (Fixes #645)

107
issues_closed_for_0.16.md Normal file
View File

@@ -0,0 +1,107 @@
This list was created with:
```
PREV=2020-07-23
NOW=2022-04-13
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.16.md
```
* [Issue #464](https://github.com/json-c/json-c/issues/464) - Speed up parsing and object creation
* [Issue #540](https://github.com/json-c/json-c/issues/540) - request: json_init_library
* [Issue #631](https://github.com/json-c/json-c/issues/631) - New 0.14 release requests
* [Issue #647](https://github.com/json-c/json-c/issues/647) - "cmake -DCMAKE_BUILD_TYPE=Release" fails with error: 'cint64' may be used uninitialized
* [Issue #648](https://github.com/json-c/json-c/issues/648) - Fix "may be used uninitialized" Release build failure
* [Issue #649](https://github.com/json-c/json-c/issues/649) - json-c tag 0.15 tarball contains a file doc/Doxyfile and generated doxygen files in doc/html
* [Issue #650](https://github.com/json-c/json-c/issues/650) - README: fix spelling errors
* [Issue #651](https://github.com/json-c/json-c/issues/651) - Getrandom
* [Issue #652](https://github.com/json-c/json-c/issues/652) - Waste memory
* [Issue #653](https://github.com/json-c/json-c/issues/653) - Make the documentation build reproducibly
* [Issue #654](https://github.com/json-c/json-c/issues/654) - A stack-buffer-overflow in json_parse.c:89:44
* [Issue #655](https://github.com/json-c/json-c/issues/655) - json_parse: Fix read past end of buffer
* [Issue #656](https://github.com/json-c/json-c/issues/656) - Fixed warnings
* [Issue #657](https://github.com/json-c/json-c/issues/657) - Use GRND_NONBLOCK with getrandom.
* [Issue #658](https://github.com/json-c/json-c/issues/658) - json_object_get_boolean() returns wrong result for objects and arrays
* [Issue #659](https://github.com/json-c/json-c/issues/659) - fix json_object_get_boolean() to behave like documented
* [Issue #660](https://github.com/json-c/json-c/issues/660) - Validate size arguments in arraylist functions.
* [Issue #661](https://github.com/json-c/json-c/issues/661) - Cleanup of some code parts
* [Issue #662](https://github.com/json-c/json-c/issues/662) - Prevent signed overflow in get_time_seed
* [Issue #663](https://github.com/json-c/json-c/issues/663) - Properly format errnos in _json_c_strerror
* [Issue #664](https://github.com/json-c/json-c/issues/664) - Limit strings at INT_MAX length
* [Issue #665](https://github.com/json-c/json-c/issues/665) - Handle more allocation failures in json_tokener* functions
* [Issue #666](https://github.com/json-c/json-c/issues/666) - test1 json_object_new_array_ext test is failing
* [Issue #667](https://github.com/json-c/json-c/issues/667) - Fixed test1 regression.
* [Issue #670](https://github.com/json-c/json-c/issues/670) - Created Stone-Paper-Scissor Game by C language
* [Issue #672](https://github.com/json-c/json-c/issues/672) - Calling exit() after failure to generate random seed
* [Issue #673](https://github.com/json-c/json-c/issues/673) - switchcasemenuproject
* [Issue #674](https://github.com/json-c/json-c/issues/674) - random_seed: on error, continue to next method
* [Issue #682](https://github.com/json-c/json-c/issues/682) - libjson-c-dev vs libjson-c3
* [Issue #683](https://github.com/json-c/json-c/issues/683) - [Question] Is it possible to clear a ptr of json_object?
* [Issue #684](https://github.com/json-c/json-c/issues/684) - json_tokener_parse_verbose failed with core dump
* [Issue #685](https://github.com/json-c/json-c/issues/685) - json_tokener_parse memory leak?
* [Issue #689](https://github.com/json-c/json-c/issues/689) - fix compilation with clang
* [Issue #690](https://github.com/json-c/json-c/issues/690) - "1," produces an object with int 1; "1" produces a null object
* [Issue #691](https://github.com/json-c/json-c/issues/691) - failed tests
* [Issue #692](https://github.com/json-c/json-c/issues/692) - patch to add arc4random
* [Issue #693](https://github.com/json-c/json-c/issues/693) - Optional parameter for packing as array
* [Issue #694](https://github.com/json-c/json-c/issues/694) - fix invalid unsigned arithmetic.
* [Issue #695](https://github.com/json-c/json-c/issues/695) - /tmp/json-c/random_seed.c:327:6: error
* [Issue #696](https://github.com/json-c/json-c/issues/696) - To avoid target exe file export JSON functions.
* [Issue #697](https://github.com/json-c/json-c/issues/697) - json_object_get_string() return value truncated when assigning it to a pointer type in Win32 App
* [Issue #698](https://github.com/json-c/json-c/issues/698) - Feature request: set allocator
* [Issue #699](https://github.com/json-c/json-c/issues/699) - Linking to libjson-c Issue
* [Issue #700](https://github.com/json-c/json-c/issues/700) - Fix unused variable for Win32 build in random_seed.c
* [Issue #701](https://github.com/json-c/json-c/issues/701) - [RFC] json_pointer: allow the feature to be disabled
* [Issue #703](https://github.com/json-c/json-c/issues/703) - Fix vasprintf fallback
* [Issue #706](https://github.com/json-c/json-c/issues/706) - Check __STDC_VERSION__ is defined before checking its value
* [Issue #707](https://github.com/json-c/json-c/issues/707) - How to build json-c-0.15 for arm arch
* [Issue #708](https://github.com/json-c/json-c/issues/708) - direct access to elements
* [Issue #709](https://github.com/json-c/json-c/issues/709) - Include guards not namespaced / build errors for debug.h with openNDS
* [Issue #710](https://github.com/json-c/json-c/issues/710) - 'file system sandbox blocked mmap()' error on iOS
* [Issue #711](https://github.com/json-c/json-c/issues/711) - creating a json object
* [Issue #712](https://github.com/json-c/json-c/issues/712) - building json-c using cmake for ESP32
* [Issue #713](https://github.com/json-c/json-c/issues/713) - When value converted to char* can not compare it with another value
* [Issue #714](https://github.com/json-c/json-c/issues/714) - Add AfterCaseLabel to .clang-format
* [Issue #716](https://github.com/json-c/json-c/issues/716) - Fixed cmake command
* [Issue #717](https://github.com/json-c/json-c/issues/717) - Cmake is able delete all files by "clean" target
* [Issue #718](https://github.com/json-c/json-c/issues/718) - CMake create uninstall target if unix generator is used
* [Issue #719](https://github.com/json-c/json-c/issues/719) - Parsing multiple JSON strings
* [Issue #722](https://github.com/json-c/json-c/issues/722) - Fix use-after-free in json_tokener_new_ex()
* [Issue #723](https://github.com/json-c/json-c/issues/723) - if set __stdcall (/Gz)
* [Issue #724](https://github.com/json-c/json-c/issues/724) - #723
* [Issue #725](https://github.com/json-c/json-c/issues/725) - json_object_from_file() execution segment error
* [Issue #726](https://github.com/json-c/json-c/issues/726) - fix cmake version for tests
* [Issue #727](https://github.com/json-c/json-c/issues/727) - Really use prefix JSON_C_OBJECT_ADD_
* [Issue #728](https://github.com/json-c/json-c/issues/728) - DRAFT PROPOSAL - Add option JSON_C_OBJECT_ADD_IF_NOT_NULL
* [Issue #729](https://github.com/json-c/json-c/issues/729) - * don't assume includedir
* [Issue #731](https://github.com/json-c/json-c/issues/731) - Json-c Error
* [Issue #732](https://github.com/json-c/json-c/issues/732) - Fix/static include dirs
* [Issue #734](https://github.com/json-c/json-c/issues/734) - Newer appveyor config for VS2022 etc...
* [Issue #735](https://github.com/json-c/json-c/issues/735) - Add policy_max to minimum required cmake version
* [Issue #736](https://github.com/json-c/json-c/issues/736) - json_object.c:308: json_object_put: Assertion `jso->_ref_count > 0' failed
* [Issue #737](https://github.com/json-c/json-c/issues/737) - Fix typo in README
* [Issue #738](https://github.com/json-c/json-c/issues/738) - General question - Is there an SLA for handling newly detected security issues?
* [Issue #739](https://github.com/json-c/json-c/issues/739) - json_escape_str(): avoid harmless unsigned integer overflow
* [Issue #741](https://github.com/json-c/json-c/issues/741) - json_type_to_name(): use correct printf() formatter
* [Issue #742](https://github.com/json-c/json-c/issues/742) - json_object_copy_serializer_data(): add assertion
* [Issue #743](https://github.com/json-c/json-c/issues/743) - Cmd adb root
* [Issue #744](https://github.com/json-c/json-c/issues/744) - Close file on error path.
* [Issue #745](https://github.com/json-c/json-c/issues/745) - vasprintf(): avoid out of memory accesses
* [Issue #746](https://github.com/json-c/json-c/issues/746) - Fix typos in code comments and ChangeLog
* [Issue #747](https://github.com/json-c/json-c/issues/747) - json_object_put: Assertion `jso->_ref_count > 0' failed
* [Issue #748](https://github.com/json-c/json-c/issues/748) - sprintbuf(): test for all vsnprintf error values
* [Issue #749](https://github.com/json-c/json-c/issues/749) - sprintbuf(): handle printbuf_memappend errors
* [Issue #750](https://github.com/json-c/json-c/issues/750) - printbuf_memset(): set gaps to zero
* [Issue #751](https://github.com/json-c/json-c/issues/751) - printbuf: do not allow invalid arguments
* [Issue #752](https://github.com/json-c/json-c/issues/752) - Fix typos
* [Issue #753](https://github.com/json-c/json-c/issues/753) - CTest failed in MSVC build
* [Issue #754](https://github.com/json-c/json-c/issues/754) - Minor improvements to documentation
* [Issue #755](https://github.com/json-c/json-c/issues/755) - Fix error messages
* [Issue #758](https://github.com/json-c/json-c/issues/758) - Preserve context if out of memory
* [Issue #760](https://github.com/json-c/json-c/issues/760) - Code style: removed unneeded double-quotes
* [Issue #761](https://github.com/json-c/json-c/issues/761) - Last commit merged to master breaks compilation
* [Issue #762](https://github.com/json-c/json-c/issues/762) - how to merge two jsons by json-c
* [Issue #763](https://github.com/json-c/json-c/issues/763) - Question: sort_fn arguments
* [Issue #764](https://github.com/json-c/json-c/issues/764) - Make test fail on test case test_util_file

View File

@@ -163,3 +163,8 @@ JSONC_0.15 {
json_object_array_shrink; json_object_array_shrink;
json_object_new_array_ext; json_object_new_array_ext;
} JSONC_0.14; } JSONC_0.14;
JSONC_0.16 {
# global:
# ...new symbols here...
} JSONC_0.15;

View File

@@ -26,7 +26,7 @@ extern "C" {
#include "json_c_version.h" #include "json_c_version.h"
#include "json_object.h" #include "json_object.h"
#include "json_object_iterator.h" #include "json_object_iterator.h"
#include "json_pointer.h" @JSON_H_JSON_POINTER@
#include "json_tokener.h" #include "json_tokener.h"
#include "json_util.h" #include "json_util.h"
#include "linkhash.h" #include "linkhash.h"

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012,2017,2019,2020 Eric Hawicz * Copyright (c) 2012,2017-2022 Eric Haszlakiewicz
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details. * it under the terms of the MIT license. See COPYING for details.
@@ -17,14 +17,14 @@ extern "C" {
#endif #endif
#define JSON_C_MAJOR_VERSION 0 #define JSON_C_MAJOR_VERSION 0
#define JSON_C_MINOR_VERSION 15 #define JSON_C_MINOR_VERSION 16
#define JSON_C_MICRO_VERSION 0 #define JSON_C_MICRO_VERSION 0
#define JSON_C_VERSION_NUM \ #define JSON_C_VERSION_NUM \
((JSON_C_MAJOR_VERSION << 16) | (JSON_C_MINOR_VERSION << 8) | JSON_C_MICRO_VERSION) ((JSON_C_MAJOR_VERSION << 16) | (JSON_C_MINOR_VERSION << 8) | JSON_C_MICRO_VERSION)
#define JSON_C_VERSION "0.15" #define JSON_C_VERSION "0.16"
#ifndef JSON_EXPORT #ifndef JSON_EXPORT
#if defined(_MSC_VER) #if defined(_MSC_VER) && defined(JSON_C_DLL)
#define JSON_EXPORT __declspec(dllexport) #define JSON_EXPORT __declspec(dllexport)
#else #else
#define JSON_EXPORT extern #define JSON_EXPORT extern

View File

@@ -13,7 +13,6 @@
#include "strerror_override.h" #include "strerror_override.h"
#include <assert.h> #include <assert.h>
#include <ctype.h>
#ifdef HAVE_LIMITS_H #ifdef HAVE_LIMITS_H
#include <limits.h> #include <limits.h>
#endif #endif
@@ -35,8 +34,11 @@
#include "snprintf_compat.h" #include "snprintf_compat.h"
#include "strdup_compat.h" #include "strdup_compat.h"
/* Avoid ctype.h and locale overhead */
#define is_plain_digit(c) ((c) >= '0' && (c) <= '9')
#if SIZEOF_LONG_LONG != SIZEOF_INT64_T #if SIZEOF_LONG_LONG != SIZEOF_INT64_T
#error "The long long type isn't 64-bits" #error The long long type is not 64-bits
#endif #endif
#ifndef SSIZE_T_MAX #ifndef SSIZE_T_MAX
@@ -51,9 +53,6 @@
#endif #endif
#endif #endif
// Don't define this. It's not thread-safe.
/* #define REFCOUNT_DEBUG 1 */
const char *json_hex_chars = "0123456789abcdefABCDEF"; const char *json_hex_chars = "0123456789abcdefABCDEF";
static void json_object_generic_delete(struct json_object *jso); static void json_object_generic_delete(struct json_object *jso);
@@ -159,41 +158,6 @@ static json_object_to_json_string_fn _json_object_userdata_to_json_string;
* */ * */
JSON_NORETURN static void json_abort(const char *message); JSON_NORETURN static void json_abort(const char *message);
/* ref count debugging */
#ifdef REFCOUNT_DEBUG
static struct lh_table *json_object_table;
static void json_object_init(void) __attribute__((constructor));
static void json_object_init(void)
{
MC_DEBUG("json_object_init: creating object table\n");
json_object_table = lh_kptr_table_new(128, NULL);
}
static void json_object_fini(void) __attribute__((destructor));
static void json_object_fini(void)
{
struct lh_entry *ent;
if (MC_GET_DEBUG())
{
if (json_object_table->count)
{
MC_DEBUG("json_object_fini: %d referenced objects at exit\n",
json_object_table->count);
lh_foreach(json_object_table, ent)
{
struct json_object *obj = (struct json_object *)lh_entry_v(ent);
MC_DEBUG("\t%s:%p\n", json_type_to_name(obj->o_type), obj);
}
}
}
MC_DEBUG("json_object_fini: freeing object table\n");
lh_table_free(json_object_table);
}
#endif /* REFCOUNT_DEBUG */
/* helper for accessing the optimized string data component in json_object /* helper for accessing the optimized string data component in json_object
*/ */
static inline char *get_string_component_mutable(struct json_object *jso) static inline char *get_string_component_mutable(struct json_object *jso)
@@ -214,10 +178,11 @@ static inline const char *get_string_component(const struct json_object *jso)
static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int flags) static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int flags)
{ {
int pos = 0, start_offset = 0; size_t pos = 0, start_offset = 0;
unsigned char c; unsigned char c;
while (len--) while (len)
{ {
--len;
c = str[pos]; c = str[pos];
switch (c) switch (c)
{ {
@@ -235,7 +200,7 @@ static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int
break; break;
} }
if (pos - start_offset > 0) if (pos > start_offset)
printbuf_memappend(pb, str + start_offset, pos - start_offset); printbuf_memappend(pb, str + start_offset, pos - start_offset);
if (c == '\b') if (c == '\b')
@@ -261,7 +226,7 @@ static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int
if (c < ' ') if (c < ' ')
{ {
char sbuf[7]; char sbuf[7];
if (pos - start_offset > 0) if (pos > start_offset)
printbuf_memappend(pb, str + start_offset, printbuf_memappend(pb, str + start_offset,
pos - start_offset); pos - start_offset);
snprintf(sbuf, sizeof(sbuf), "\\u00%c%c", json_hex_chars[c >> 4], snprintf(sbuf, sizeof(sbuf), "\\u00%c%c", json_hex_chars[c >> 4],
@@ -273,7 +238,7 @@ static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int
pos++; pos++;
} }
} }
if (pos - start_offset > 0) if (pos > start_offset)
printbuf_memappend(pb, str + start_offset, pos - start_offset); printbuf_memappend(pb, str + start_offset, pos - start_offset);
return 0; return 0;
} }
@@ -337,10 +302,6 @@ int json_object_put(struct json_object *jso)
static void json_object_generic_delete(struct json_object *jso) static void json_object_generic_delete(struct json_object *jso)
{ {
#ifdef REFCOUNT_DEBUG
MC_DEBUG("json_object_delete_%s: %p\n", json_type_to_name(jso->o_type), jso);
lh_table_delete(json_object_table, jso);
#endif /* REFCOUNT_DEBUG */
printbuf_free(jso->_pb); printbuf_free(jso->_pb);
free(jso); free(jso);
} }
@@ -362,10 +323,6 @@ static inline struct json_object *json_object_new(enum json_type o_type, size_t
jso->_userdata = NULL; jso->_userdata = NULL;
//jso->... // Type-specific fields must be set by caller //jso->... // Type-specific fields must be set by caller
#ifdef REFCOUNT_DEBUG
lh_table_insert(json_object_table, jso, jso);
MC_DEBUG("json_object_new_%s: %p\n", json_type_to_name(jso->o_type), jso);
#endif /* REFCOUNT_DEBUG */
return jso; return jso;
} }
@@ -542,7 +499,7 @@ static int json_object_object_to_json_string(struct json_object *jso, struct pri
static void json_object_lh_entry_free(struct lh_entry *ent) static void json_object_lh_entry_free(struct lh_entry *ent)
{ {
if (!ent->k_is_constant) if (!lh_entry_k_is_constant(ent))
free(lh_entry_k(ent)); free(lh_entry_k(ent));
json_object_put((struct json_object *)lh_entry_v(ent)); json_object_put((struct json_object *)lh_entry_v(ent));
} }
@@ -605,7 +562,7 @@ int json_object_object_add_ex(struct json_object *jso, const char *const key,
if (!existing_entry) if (!existing_entry)
{ {
const void *const k = const void *const k =
(opts & JSON_C_OBJECT_KEY_IS_CONSTANT) ? (const void *)key : strdup(key); (opts & JSON_C_OBJECT_ADD_CONSTANT_KEY) ? (const void *)key : strdup(key);
if (k == NULL) if (k == NULL)
return -1; return -1;
return lh_table_insert_w_hash(JC_OBJECT(jso)->c_object, k, val, hash, opts); return lh_table_insert_w_hash(JC_OBJECT(jso)->c_object, k, val, hash, opts);
@@ -613,7 +570,7 @@ int json_object_object_add_ex(struct json_object *jso, const char *const key,
existing_value = (json_object *)lh_entry_v(existing_entry); existing_value = (json_object *)lh_entry_v(existing_entry);
if (existing_value) if (existing_value)
json_object_put(existing_value); json_object_put(existing_value);
existing_entry->v = val; lh_entry_set_val(existing_entry, val);
return 0; return 0;
} }
@@ -735,7 +692,7 @@ struct json_object *json_object_new_int(int32_t i)
int32_t json_object_get_int(const struct json_object *jso) int32_t json_object_get_int(const struct json_object *jso)
{ {
int64_t cint64=0; int64_t cint64 = 0;
double cdouble; double cdouble;
enum json_type o_type; enum json_type o_type;
@@ -976,7 +933,21 @@ int json_c_set_serialization_double_format(const char *double_format, int global
#endif #endif
if (global_serialization_float_format) if (global_serialization_float_format)
free(global_serialization_float_format); free(global_serialization_float_format);
global_serialization_float_format = double_format ? strdup(double_format) : NULL; if (double_format)
{
char *p = strdup(double_format);
if (p == NULL)
{
_json_c_set_last_err("json_c_set_serialization_double_format: "
"out of memory\n");
return -1;
}
global_serialization_float_format = p;
}
else
{
global_serialization_float_format = NULL;
}
} }
else if (global_or_thread == JSON_C_OPTION_THREAD) else if (global_or_thread == JSON_C_OPTION_THREAD)
{ {
@@ -986,16 +957,31 @@ int json_c_set_serialization_double_format(const char *double_format, int global
free(tls_serialization_float_format); free(tls_serialization_float_format);
tls_serialization_float_format = NULL; tls_serialization_float_format = NULL;
} }
tls_serialization_float_format = double_format ? strdup(double_format) : NULL; if (double_format)
{
char *p = strdup(double_format);
if (p == NULL)
{
_json_c_set_last_err("json_c_set_serialization_double_format: "
"out of memory\n");
return -1;
}
tls_serialization_float_format = p;
}
else
{
tls_serialization_float_format = NULL;
}
#else #else
_json_c_set_last_err("json_c_set_option: not compiled with __thread support\n"); _json_c_set_last_err("json_c_set_serialization_double_format: not compiled "
"with __thread support\n");
return -1; return -1;
#endif #endif
} }
else else
{ {
_json_c_set_last_err("json_c_set_option: invalid global_or_thread value: %d\n", _json_c_set_last_err("json_c_set_serialization_double_format: invalid "
global_or_thread); "global_or_thread value: %d\n", global_or_thread);
return -1; return -1;
} }
return 0; return 0;
@@ -1056,8 +1042,7 @@ static int json_object_double_to_json_string_format(struct json_object *jso, str
format_drops_decimals = 1; format_drops_decimals = 1;
looks_numeric = /* Looks like *some* kind of number */ looks_numeric = /* Looks like *some* kind of number */
isdigit((unsigned char)buf[0]) || is_plain_digit(buf[0]) || (size > 1 && buf[0] == '-' && is_plain_digit(buf[1]));
(size > 1 && buf[0] == '-' && isdigit((unsigned char)buf[1]));
if (size < (int)sizeof(buf) - 2 && looks_numeric && !p && /* Has no decimal point */ if (size < (int)sizeof(buf) - 2 && looks_numeric && !p && /* Has no decimal point */
strchr(buf, 'e') == NULL && /* Not scientific notation */ strchr(buf, 'e') == NULL && /* Not scientific notation */
@@ -1254,17 +1239,17 @@ static struct json_object *_json_object_new_string(const char *s, const size_t l
struct json_object_string *jso; struct json_object_string *jso;
/* /*
* Structures Actual memory layout * Structures Actual memory layout
* ------------------- -------------------- * ------------------- --------------------
* [json_object_string [json_object_string * [json_object_string [json_object_string
* [json_object] [json_object] * [json_object] [json_object]
* ...other fields... ...other fields... * ...other fields... ...other fields...
* c_string] len * c_string] len
* bytes * bytes
* of * of
* string * string
* data * data
* \0] * \0]
*/ */
if (len > (SSIZE_T_MAX - (sizeof(*jso) - sizeof(jso->c_string)) - 1)) if (len > (SSIZE_T_MAX - (sizeof(*jso) - sizeof(jso->c_string)) - 1))
return NULL; return NULL;
@@ -1281,7 +1266,8 @@ static struct json_object *_json_object_new_string(const char *s, const size_t l
return NULL; return NULL;
jso->len = len; jso->len = len;
memcpy(jso->c_string.idata, s, len); memcpy(jso->c_string.idata, s, len);
jso->c_string.idata[len] = '\0'; // Cast below needed for Clang UB sanitizer
((char *)jso->c_string.idata)[len] = '\0';
return &jso->base; return &jso->base;
} }
@@ -1305,18 +1291,20 @@ const char *json_object_get_string(struct json_object *jso)
default: return json_object_to_json_string(jso); default: return json_object_to_json_string(jso);
} }
} }
int json_object_get_string_len(const struct json_object *jso)
static inline ssize_t _json_object_get_string_len(const struct json_object_string *jso)
{ {
ssize_t len; ssize_t len;
len = jso->len;
return (len < 0) ? -(ssize_t)len : len;
}
int json_object_get_string_len(const struct json_object *jso)
{
if (!jso) if (!jso)
return 0; return 0;
switch (jso->o_type) switch (jso->o_type)
{ {
case json_type_string: case json_type_string: return _json_object_get_string_len(JC_STRING_C(jso));
{
len = JC_STRING_C(jso)->len;
return (len < 0) ? -(ssize_t)len : len;
}
default: return 0; default: return 0;
} }
} }
@@ -1329,9 +1317,10 @@ static int _json_object_set_string_len(json_object *jso, const char *s, size_t l
if (jso == NULL || jso->o_type != json_type_string) if (jso == NULL || jso->o_type != json_type_string)
return 0; return 0;
if (len >= SSIZE_T_MAX - 1) if (len >= INT_MAX - 1)
// jso->len is a signed ssize_t, so it can't hold the // jso->len is a signed ssize_t, so it can't hold the
// full size_t range. // full size_t range. json_object_get_string_len returns
// length as int, cap length at INT_MAX.
return 0; return 0;
dstbuf = get_string_component_mutable(jso); dstbuf = get_string_component_mutable(jso);
@@ -1605,9 +1594,10 @@ int json_object_equal(struct json_object *jso1, struct json_object *jso2)
case json_type_string: case json_type_string:
{ {
return (json_object_get_string_len(jso1) == json_object_get_string_len(jso2) && return (_json_object_get_string_len(JC_STRING(jso1)) ==
_json_object_get_string_len(JC_STRING(jso2)) &&
memcmp(get_string_component(jso1), get_string_component(jso2), memcmp(get_string_component(jso1), get_string_component(jso2),
json_object_get_string_len(jso1)) == 0); _json_object_get_string_len(JC_STRING(jso1))) == 0);
} }
case json_type_object: return json_object_all_values_equal(jso1, jso2); case json_type_object: return json_object_all_values_equal(jso1, jso2);
@@ -1628,14 +1618,22 @@ static int json_object_copy_serializer_data(struct json_object *src, struct json
if (dst->_to_json_string == json_object_userdata_to_json_string || if (dst->_to_json_string == json_object_userdata_to_json_string ||
dst->_to_json_string == _json_object_userdata_to_json_string) dst->_to_json_string == _json_object_userdata_to_json_string)
{ {
dst->_userdata = strdup(src->_userdata); char *p;
assert(src->_userdata);
p = strdup(src->_userdata);
if (p == NULL)
{
_json_c_set_last_err("json_object_copy_serializer_data: out of memory\n");
return -1;
}
dst->_userdata = p;
} }
// else if ... other supported serializers ... // else if ... other supported serializers ...
else else
{ {
_json_c_set_last_err( _json_c_set_last_err(
"json_object_deep_copy: unable to copy unknown serializer data: %p\n", "json_object_copy_serializer_data: unable to copy unknown serializer data: "
(void *)dst->_to_json_string); "%p\n", (void *)dst->_to_json_string);
return -1; return -1;
} }
dst->_user_delete = src->_user_delete; dst->_user_delete = src->_user_delete;
@@ -1672,7 +1670,10 @@ int json_c_shallow_copy_default(json_object *src, json_object *parent, const cha
} }
break; break;
case json_type_string: *dst = json_object_new_string(get_string_component(src)); break; case json_type_string:
*dst = json_object_new_string_len(get_string_component(src),
_json_object_get_string_len(JC_STRING(src)));
break;
case json_type_object: *dst = json_object_new_object(); break; case json_type_object: *dst = json_object_new_object(); break;
@@ -1724,8 +1725,8 @@ static int json_object_deep_copy_recursive(struct json_object *src, struct json_
/* This handles the `json_type_null` case */ /* This handles the `json_type_null` case */
if (!iter.val) if (!iter.val)
jso = NULL; jso = NULL;
else if (json_object_deep_copy_recursive(iter.val, src, iter.key, -1, &jso, else if (json_object_deep_copy_recursive(iter.val, src, iter.key, UINT_MAX,
shallow_copy) < 0) &jso, shallow_copy) < 0)
{ {
json_object_put(jso); json_object_put(jso);
return -1; return -1;
@@ -1789,7 +1790,7 @@ int json_object_deep_copy(struct json_object *src, struct json_object **dst,
if (shallow_copy == NULL) if (shallow_copy == NULL)
shallow_copy = json_c_shallow_copy_default; shallow_copy = json_c_shallow_copy_default;
rc = json_object_deep_copy_recursive(src, NULL, NULL, -1, dst, shallow_copy); rc = json_object_deep_copy_recursive(src, NULL, NULL, UINT_MAX, dst, shallow_copy);
if (rc < 0) if (rc < 0)
{ {
json_object_put(*dst); json_object_put(*dst);

View File

@@ -52,7 +52,7 @@ extern "C" {
* json_object_to_file_ext() functions which causes * json_object_to_file_ext() functions which causes
* the output to be formatted. * the output to be formatted.
* *
* See the "Two Space Tab" option at http://jsonformatter.curiousconcept.com/ * See the "Two Space Tab" option at https://jsonformatter.curiousconcept.com/
* for an example of the format. * for an example of the format.
*/ */
#define JSON_C_TO_STRING_PRETTY (1 << 1) #define JSON_C_TO_STRING_PRETTY (1 << 1)
@@ -100,9 +100,17 @@ extern "C" {
* key is given as a real constant value in the function * key is given as a real constant value in the function
* call, e.g. as in * call, e.g. as in
* json_object_object_add_ex(obj, "ip", json, * json_object_object_add_ex(obj, "ip", json,
* JSON_C_OBJECT_KEY_IS_CONSTANT); * JSON_C_OBJECT_ADD_CONSTANT_KEY);
*/ */
#define JSON_C_OBJECT_KEY_IS_CONSTANT (1 << 2) #define JSON_C_OBJECT_ADD_CONSTANT_KEY (1 << 2)
/**
* This flag is an alias to JSON_C_OBJECT_ADD_CONSTANT_KEY.
* Historically, this flag was used first and the new name
* JSON_C_OBJECT_ADD_CONSTANT_KEY was introduced for version
* 0.16.00 in order to have regular naming.
* Use of this flag is now legacy.
*/
#define JSON_C_OBJECT_KEY_IS_CONSTANT JSON_C_OBJECT_ADD_CONSTANT_KEY
/** /**
* Set the global value of an option, which will apply to all * Set the global value of an option, which will apply to all
@@ -131,7 +139,7 @@ extern "C" {
* beyond the lifetime of the parent object. * beyond the lifetime of the parent object.
* - Detaching an object field or array index from its parent object * - Detaching an object field or array index from its parent object
* (using `json_object_object_del()` or `json_object_array_del_idx()`) * (using `json_object_object_del()` or `json_object_array_del_idx()`)
* - Sharing a json_object with multiple (not necesarily parallel) threads * - Sharing a json_object with multiple (not necessarily parallel) threads
* of execution that all expect to free it (with `json_object_put()`) when * of execution that all expect to free it (with `json_object_put()`) when
* they're done. * they're done.
* *
@@ -470,19 +478,19 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key
* @param val the local name for the json_object* object variable defined in * @param val the local name for the json_object* object variable defined in
* the body * the body
*/ */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
#define json_object_object_foreach(obj, key, val) \ #define json_object_object_foreach(obj, key, val) \
char *key = NULL; \ char *key = NULL; \
struct json_object *val __attribute__((__unused__)) = NULL; \ struct json_object *val __attribute__((__unused__)) = NULL; \
for (struct lh_entry *entry##key = json_object_get_object(obj)->head, \ for (struct lh_entry *entry##key = lh_table_head(json_object_get_object(obj)), \
*entry_next##key = NULL; \ *entry_next##key = NULL; \
({ \ ({ \
if (entry##key) \ if (entry##key) \
{ \ { \
key = (char *)lh_entry_k(entry##key); \ key = (char *)lh_entry_k(entry##key); \
val = (struct json_object *)lh_entry_v(entry##key); \ val = (struct json_object *)lh_entry_v(entry##key); \
entry_next##key = entry##key->next; \ entry_next##key = lh_entry_next(entry##key); \
}; \ }; \
entry##key; \ entry##key; \
}); \ }); \
@@ -495,25 +503,25 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key
struct json_object *val = NULL; \ struct json_object *val = NULL; \
struct lh_entry *entry##key; \ struct lh_entry *entry##key; \
struct lh_entry *entry_next##key = NULL; \ struct lh_entry *entry_next##key = NULL; \
for (entry##key = json_object_get_object(obj)->head; \ for (entry##key = lh_table_head(json_object_get_object(obj)); \
(entry##key ? (key = (char *)lh_entry_k(entry##key), \ (entry##key ? (key = (char *)lh_entry_k(entry##key), \
val = (struct json_object *)lh_entry_v(entry##key), \ val = (struct json_object *)lh_entry_v(entry##key), \
entry_next##key = entry##key->next, entry##key) \ entry_next##key = lh_entry_next(entry##key), entry##key) \
: 0); \ : 0); \
entry##key = entry_next##key) entry##key = entry_next##key)
#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L */ #endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) */
/** Iterate through all keys and values of an object (ANSI C Safe) /** Iterate through all keys and values of an object (ANSI C Safe)
* @param obj the json_object instance * @param obj the json_object instance
* @param iter the object iterator, use type json_object_iter * @param iter the object iterator, use type json_object_iter
*/ */
#define json_object_object_foreachC(obj, iter) \ #define json_object_object_foreachC(obj, iter) \
for (iter.entry = json_object_get_object(obj)->head; \ for (iter.entry = lh_table_head(json_object_get_object(obj)); \
(iter.entry ? (iter.key = (char *)lh_entry_k(iter.entry), \ (iter.entry ? (iter.key = (char *)lh_entry_k(iter.entry), \
iter.val = (struct json_object *)lh_entry_v(iter.entry), iter.entry) \ iter.val = (struct json_object *)lh_entry_v(iter.entry), iter.entry) \
: 0); \ : 0); \
iter.entry = iter.entry->next) iter.entry = lh_entry_next(iter.entry))
/* Array type methods */ /* Array type methods */
@@ -656,8 +664,9 @@ JSON_EXPORT struct json_object *json_object_new_boolean(json_bool b);
* The type is coerced to a json_bool if the passed object is not a json_bool. * The type is coerced to a json_bool if the passed object is not a json_bool.
* integer and double objects will return 0 if there value is zero * integer and double objects will return 0 if there value is zero
* or 1 otherwise. If the passed object is a string it will return * or 1 otherwise. If the passed object is a string it will return
* 1 if it has a non zero length. If any other object type is passed * 1 if it has a non zero length.
* 1 will be returned if the object is not NULL. * If any other object type is passed 0 will be returned, even non-empty
* json_type_array and json_type_object objects.
* *
* @param obj the json_object instance * @param obj the json_object instance
* @returns a json_bool * @returns a json_bool
@@ -738,7 +747,7 @@ JSON_EXPORT int json_object_set_int(struct json_object *obj, int new_value);
* *
* @param obj the json_object instance * @param obj the json_object instance
* @param val the value to add * @param val the value to add
* @returns 1 if the increment succeded, 0 otherwise * @returns 1 if the increment succeeded, 0 otherwise
*/ */
JSON_EXPORT int json_object_int_inc(struct json_object *obj, int64_t val); JSON_EXPORT int json_object_int_inc(struct json_object *obj, int64_t val);
@@ -1055,7 +1064,7 @@ JSON_EXPORT json_c_shallow_copy_fn json_c_shallow_copy_default;
* when custom serializers are in use. See also * when custom serializers are in use. See also
* json_object set_serializer. * json_object set_serializer.
* *
* @returns 0 if the copy went well, -1 if an error occured during copy * @returns 0 if the copy went well, -1 if an error occurred during copy
* or if the destination pointer is non-NULL * or if the destination pointer is non-NULL
*/ */

View File

@@ -71,7 +71,7 @@ struct json_object_iterator json_object_iter_begin(struct json_object *obj)
/// @note For a pair-less Object, head is NULL, which matches our /// @note For a pair-less Object, head is NULL, which matches our
/// definition of the "end" iterator /// definition of the "end" iterator
iter.opaque_ = pTable->head; iter.opaque_ = lh_table_head(pTable);
return iter; return iter;
} }
@@ -98,7 +98,7 @@ void json_object_iter_next(struct json_object_iterator *iter)
JASSERT(NULL != iter); JASSERT(NULL != iter);
JASSERT(kObjectEndIterValue != iter->opaque_); JASSERT(kObjectEndIterValue != iter->opaque_);
iter->opaque_ = ((const struct lh_entry *)iter->opaque_)->next; iter->opaque_ = lh_entry_next(((const struct lh_entry *)iter->opaque_));
} }
/** /**

View File

@@ -10,7 +10,6 @@
#include "strerror_override.h" #include "strerror_override.h"
#include <ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -20,6 +19,9 @@
#include "strdup_compat.h" #include "strdup_compat.h"
#include "vasprintf_compat.h" #include "vasprintf_compat.h"
/* Avoid ctype.h and locale overhead */
#define is_plain_digit(c) ((c) >= '0' && (c) <= '9')
/** /**
* JavaScript Object Notation (JSON) Pointer * JavaScript Object Notation (JSON) Pointer
* RFC 6901 - https://tools.ietf.org/html/rfc6901 * RFC 6901 - https://tools.ietf.org/html/rfc6901
@@ -47,7 +49,7 @@ static int is_valid_index(struct json_object *jo, const char *path, int32_t *idx
*/ */
if (len == 1) if (len == 1)
{ {
if (isdigit((unsigned char)path[0])) if (is_plain_digit(path[0]))
{ {
*idx = (path[0] - '0'); *idx = (path[0] - '0');
goto check_oob; goto check_oob;
@@ -64,7 +66,7 @@ static int is_valid_index(struct json_object *jo, const char *path, int32_t *idx
/* RFC states base-10 decimals */ /* RFC states base-10 decimals */
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
if (!isdigit((unsigned char)path[i])) if (!is_plain_digit(path[i]))
{ {
errno = EINVAL; errno = EINVAL;
return 0; return 0;

View File

@@ -10,14 +10,13 @@
* *
* Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved. * Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved.
* The copyrights to the contents of this file are licensed under the MIT License * The copyrights to the contents of this file are licensed under the MIT License
* (http://www.opensource.org/licenses/mit-license.php) * (https://www.opensource.org/licenses/mit-license.php)
*/ */
#include "config.h" #include "config.h"
#include "math_compat.h" #include "math_compat.h"
#include <assert.h> #include <assert.h>
#include <ctype.h>
#include <limits.h> #include <limits.h>
#include <math.h> #include <math.h>
#include <stddef.h> #include <stddef.h>
@@ -53,6 +52,34 @@
#error You do not have strncasecmp on your system. #error You do not have strncasecmp on your system.
#endif /* HAVE_STRNCASECMP */ #endif /* HAVE_STRNCASECMP */
#if defined(_MSC_VER) && (_MSC_VER <= 1800)
/* VS2013 doesn't know about "inline" */
#define inline __inline
#elif defined(AIX_CC)
#define inline
#endif
/* The following helper functions are used to speed up parsing. They
* are faster than their ctype counterparts because they assume that
* the input is in ASCII and that the locale is set to "C". The
* compiler will also inline these functions, providing an additional
* speedup by saving on function calls.
*/
static inline int is_ws_char(char c)
{
return c == ' '
|| c == '\t'
|| c == '\n'
|| c == '\r';
}
static inline int is_hex_char(char c)
{
return (c >= '0' && c <= '9')
|| (c >= 'A' && c <= 'F')
|| (c >= 'a' && c <= 'f');
}
/* Use C99 NAN by default; if not available, nan("") should work too. */ /* Use C99 NAN by default; if not available, nan("") should work too. */
#ifndef NAN #ifndef NAN
#define NAN nan("") #define NAN nan("")
@@ -61,7 +88,8 @@
static const char json_null_str[] = "null"; static const char json_null_str[] = "null";
static const int json_null_str_len = sizeof(json_null_str) - 1; static const int json_null_str_len = sizeof(json_null_str) - 1;
static const char json_inf_str[] = "Infinity"; static const char json_inf_str[] = "Infinity";
static const char json_inf_str_lower[] = "infinity"; /* Swapped case "Infinity" to avoid need to call tolower() on input chars: */
static const char json_inf_str_invert[] = "iNFINITY";
static const unsigned int json_inf_str_len = sizeof(json_inf_str) - 1; static const unsigned int json_inf_str_len = sizeof(json_inf_str) - 1;
static const char json_nan_str[] = "NaN"; static const char json_nan_str[] = "NaN";
static const int json_nan_str_len = sizeof(json_nan_str) - 1; static const int json_nan_str_len = sizeof(json_nan_str) - 1;
@@ -134,6 +162,12 @@ struct json_tokener *json_tokener_new_ex(int depth)
return NULL; return NULL;
} }
tok->pb = printbuf_new(); tok->pb = printbuf_new();
if (!tok->pb)
{
free(tok->stack);
free(tok);
return NULL;
}
tok->max_depth = depth; tok->max_depth = depth;
json_tokener_reset(tok); json_tokener_reset(tok);
return tok; return tok;
@@ -316,7 +350,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
case json_tokener_state_eatws: case json_tokener_state_eatws:
/* Advance until we change state */ /* Advance until we change state */
while (isspace((unsigned char)c)) while (is_ws_char(c))
{ {
if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok))) if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok)))
goto out; goto out;
@@ -421,17 +455,15 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
* complicated with likely little performance benefit. * complicated with likely little performance benefit.
*/ */
int is_negative = 0; int is_negative = 0;
const char *_json_inf_str = json_inf_str;
if (!(tok->flags & JSON_TOKENER_STRICT))
_json_inf_str = json_inf_str_lower;
/* Note: tok->st_pos must be 0 when state is set to json_tokener_state_inf */ /* Note: tok->st_pos must be 0 when state is set to json_tokener_state_inf */
while (tok->st_pos < (int)json_inf_str_len) while (tok->st_pos < (int)json_inf_str_len)
{ {
char inf_char = *str; char inf_char = *str;
if (!(tok->flags & JSON_TOKENER_STRICT)) if (inf_char != json_inf_str[tok->st_pos] &&
inf_char = tolower((unsigned char)*str); ((tok->flags & JSON_TOKENER_STRICT) ||
if (inf_char != _json_inf_str[tok->st_pos]) inf_char != json_inf_str_invert[tok->st_pos])
)
{ {
tok->err = json_tokener_error_parse_unexpected; tok->err = json_tokener_error_parse_unexpected;
goto out; goto out;
@@ -647,7 +679,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
/* Handle a 4-byte \uNNNN sequence, or two sequences if a surrogate pair */ /* Handle a 4-byte \uNNNN sequence, or two sequences if a surrogate pair */
while (1) while (1)
{ {
if (!c || !strchr(json_hex_chars, c)) if (!c || !is_hex_char(c))
{ {
tok->err = json_tokener_error_parse_string; tok->err = json_tokener_error_parse_string;
goto out; goto out;
@@ -714,7 +746,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
* we can't simply peek ahead here, because the * we can't simply peek ahead here, because the
* characters we need might not be passed to us * characters we need might not be passed to us
* until a subsequent call to json_tokener_parse. * until a subsequent call to json_tokener_parse.
* Instead, transition throug a couple of states. * Instead, transition through a couple of states.
* (now): * (now):
* _escape_unicode => _unicode_need_escape * _escape_unicode => _unicode_need_escape
* (see a '\\' char): * (see a '\\' char):
@@ -920,7 +952,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
next call to json_tokener_parse(). next call to json_tokener_parse().
*/ */
if (tok->depth > 0 && c != ',' && c != ']' && c != '}' && c != '/' && if (tok->depth > 0 && c != ',' && c != ']' && c != '}' && c != '/' &&
c != 'I' && c != 'i' && !isspace((unsigned char)c)) c != 'I' && c != 'i' && !is_ws_char(c))
{ {
tok->err = json_tokener_error_parse_number; tok->err = json_tokener_error_parse_number;
goto out; goto out;

View File

@@ -18,7 +18,7 @@ extern "C" {
#endif #endif
#ifndef JSON_EXPORT #ifndef JSON_EXPORT
#if defined(_MSC_VER) #if defined(_MSC_VER) && defined(JSON_C_DLL)
#define JSON_EXPORT __declspec(dllexport) #define JSON_EXPORT __declspec(dllexport)
#else #else
#define JSON_EXPORT extern #define JSON_EXPORT extern

View File

@@ -14,7 +14,6 @@
#include "strerror_override.h" #include "strerror_override.h"
#include <ctype.h>
#include <limits.h> #include <limits.h>
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h> #include <stddef.h>
@@ -92,7 +91,7 @@ struct json_object *json_object_from_fd_ex(int fd, int in_depth)
if (!(pb = printbuf_new())) if (!(pb = printbuf_new()))
{ {
_json_c_set_last_err("json_object_from_file: printbuf_new failed\n"); _json_c_set_last_err("json_object_from_fd_ex: printbuf_new failed\n");
return NULL; return NULL;
} }
@@ -102,7 +101,7 @@ struct json_object *json_object_from_fd_ex(int fd, int in_depth)
if (!tok) if (!tok)
{ {
_json_c_set_last_err( _json_c_set_last_err(
"json_object_from_fd: unable to allocate json_tokener(depth=%d): %s\n", depth, "json_object_from_fd_ex: unable to allocate json_tokener(depth=%d): %s\n", depth,
strerror(errno)); strerror(errno));
printbuf_free(pb); printbuf_free(pb);
return NULL; return NULL;
@@ -114,7 +113,7 @@ struct json_object *json_object_from_fd_ex(int fd, int in_depth)
} }
if (ret < 0) if (ret < 0)
{ {
_json_c_set_last_err("json_object_from_fd: error reading fd %d: %s\n", fd, _json_c_set_last_err("json_object_from_fd_ex: error reading fd %d: %s\n", fd,
strerror(errno)); strerror(errno));
json_tokener_free(tok); json_tokener_free(tok);
printbuf_free(pb); printbuf_free(pb);
@@ -138,8 +137,8 @@ struct json_object *json_object_from_file(const char *filename)
if ((fd = open(filename, O_RDONLY)) < 0) if ((fd = open(filename, O_RDONLY)) < 0)
{ {
_json_c_set_last_err("json_object_from_file: error opening file %s: %s\n", filename, _json_c_set_last_err("json_object_from_file: error opening file %s: %s\n",
strerror(errno)); filename, strerror(errno));
return NULL; return NULL;
} }
obj = json_object_from_fd(fd); obj = json_object_from_fd(fd);
@@ -156,14 +155,14 @@ int json_object_to_file_ext(const char *filename, struct json_object *obj, int f
if (!obj) if (!obj)
{ {
_json_c_set_last_err("json_object_to_file: object is null\n"); _json_c_set_last_err("json_object_to_file_ext: object is null\n");
return -1; return -1;
} }
if ((fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0644)) < 0) if ((fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0644)) < 0)
{ {
_json_c_set_last_err("json_object_to_file: error opening file %s: %s\n", filename, _json_c_set_last_err("json_object_to_file_ext: error opening file %s: %s\n",
strerror(errno)); filename, strerror(errno));
return -1; return -1;
} }
ret = _json_object_to_fd(fd, obj, flags, filename); ret = _json_object_to_fd(fd, obj, flags, filename);
@@ -203,7 +202,7 @@ static int _json_object_to_fd(int fd, struct json_object *obj, int flags, const
{ {
if ((ret = write(fd, json_str + wpos, wsize - wpos)) < 0) if ((ret = write(fd, json_str + wpos, wsize - wpos)) < 0)
{ {
_json_c_set_last_err("json_object_to_file: error writing file %s: %s\n", _json_c_set_last_err("json_object_to_fd: error writing file %s: %s\n",
filename, strerror(errno)); filename, strerror(errno));
return -1; return -1;
} }
@@ -289,8 +288,8 @@ const char *json_type_to_name(enum json_type o_type)
int o_type_int = (int)o_type; int o_type_int = (int)o_type;
if (o_type_int < 0 || o_type_int >= (int)NELEM(json_type_name)) if (o_type_int < 0 || o_type_int >= (int)NELEM(json_type_name))
{ {
_json_c_set_last_err("json_type_to_name: type %d is out of range [0,%d]\n", o_type, _json_c_set_last_err("json_type_to_name: type %d is out of range [0,%u]\n", o_type,
NELEM(json_type_name)); (unsigned)NELEM(json_type_name));
return NULL; return NULL;
} }
return json_type_name[o_type]; return json_type_name[o_type];

View File

@@ -65,9 +65,9 @@ int lh_ptr_equal(const void *k1, const void *k2)
/* /*
* hashlittle from lookup3.c, by Bob Jenkins, May 2006, Public Domain. * hashlittle from lookup3.c, by Bob Jenkins, May 2006, Public Domain.
* http://burtleburtle.net/bob/c/lookup3.c * https://burtleburtle.net/bob/c/lookup3.c
* minor modifications to make functions static so no symbols are exported * minor modifications to make functions static so no symbols are exported
* minor mofifications to compile with -Werror * minor modifications to compile with -Werror
*/ */
/* /*
@@ -81,7 +81,7 @@ if SELF_TEST is defined. You can use this free for any purpose. It's in
the public domain. It has no warranty. the public domain. It has no warranty.
You probably want to use hashlittle(). hashlittle() and hashbig() You probably want to use hashlittle(). hashlittle() and hashbig()
hash byte arrays. hashlittle() is is faster than hashbig() on hash byte arrays. hashlittle() is faster than hashbig() on
little-endian machines. Intel and AMD are little-endian machines. little-endian machines. Intel and AMD are little-endian machines.
On second thought, you probably want hashlittle2(), which is identical to On second thought, you probably want hashlittle2(), which is identical to
hashlittle() except it returns two 32-bit hashes for the price of one. hashlittle() except it returns two 32-bit hashes for the price of one.
@@ -156,7 +156,7 @@ satisfy this are
14 9 3 7 17 3 14 9 3 7 17 3
Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
for "differ" defined as + with a one-bit base and a two-bit delta. I for "differ" defined as + with a one-bit base and a two-bit delta. I
used http://burtleburtle.net/bob/hash/avalanche.html to choose used https://burtleburtle.net/bob/hash/avalanche.html to choose
the operations, constants, and arrangements of the variables. the operations, constants, and arrangements of the variables.
This does not achieve avalanche. There are input bits of (a,b,c) This does not achieve avalanche. There are input bits of (a,b,c)
@@ -285,9 +285,9 @@ static uint32_t hashlittle(const void *key, size_t length, uint32_t initval)
* rest of the string. Every machine with memory protection I've seen * rest of the string. Every machine with memory protection I've seen
* does it on word boundaries, so is OK with this. But VALGRIND will * does it on word boundaries, so is OK with this. But VALGRIND will
* still catch it and complain. The masking trick does make the hash * still catch it and complain. The masking trick does make the hash
* noticably faster for short strings (like English words). * noticeably faster for short strings (like English words).
* AddressSanitizer is similarly picky about overrunning * AddressSanitizer is similarly picky about overrunning
* the buffer. (http://clang.llvm.org/docs/AddressSanitizer.html * the buffer. (https://clang.llvm.org/docs/AddressSanitizer.html)
*/ */
#ifdef VALGRIND #ifdef VALGRIND
#define PRECISE_MEMORY_ACCESS 1 #define PRECISE_MEMORY_ACCESS 1
@@ -439,8 +439,8 @@ static uint32_t hashlittle(const void *key, size_t length, uint32_t initval)
} }
/* clang-format on */ /* clang-format on */
/* a simple hash function similiar to what perl does for strings. /* a simple hash function similar to what perl does for strings.
* for good results, the string should not be excessivly large. * for good results, the string should not be excessively large.
*/ */
static unsigned long lh_perllike_str_hash(const void *k) static unsigned long lh_perllike_str_hash(const void *k)
{ {
@@ -465,7 +465,7 @@ static unsigned long lh_char_hash(const void *k)
if (random_seed == -1) if (random_seed == -1)
{ {
RANDOM_SEED_TYPE seed; RANDOM_SEED_TYPE seed;
/* we can't use -1 as it is the unitialized sentinel */ /* we can't use -1 as it is the uninitialized sentinel */
while ((seed = json_c_get_random_seed()) == -1) {} while ((seed = json_c_get_random_seed()) == -1) {}
#if SIZEOF_INT == 8 && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 #if SIZEOF_INT == 8 && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
#define USE_SYNC_COMPARE_AND_SWAP 1 #define USE_SYNC_COMPARE_AND_SWAP 1
@@ -481,12 +481,12 @@ static unsigned long lh_char_hash(const void *k)
#elif defined _MSC_VER || defined __MINGW32__ #elif defined _MSC_VER || defined __MINGW32__
InterlockedCompareExchange(&random_seed, seed, -1); InterlockedCompareExchange(&random_seed, seed, -1);
#else #else
//#warning "racy random seed initializtion if used by multiple threads" //#warning "racy random seed initialization if used by multiple threads"
random_seed = seed; /* potentially racy */ random_seed = seed; /* potentially racy */
#endif #endif
} }
return hashlittle((const char *)k, strlen((const char *)k), random_seed); return hashlittle((const char *)k, strlen((const char *)k), (uint32_t)random_seed);
} }
int lh_char_equal(const void *k1, const void *k2) int lh_char_equal(const void *k1, const void *k2)
@@ -546,7 +546,7 @@ int lh_table_resize(struct lh_table *t, int new_size)
unsigned long h = lh_get_hash(new_t, ent->k); unsigned long h = lh_get_hash(new_t, ent->k);
unsigned int opts = 0; unsigned int opts = 0;
if (ent->k_is_constant) if (ent->k_is_constant)
opts = JSON_C_OBJECT_KEY_IS_CONSTANT; opts = JSON_C_OBJECT_ADD_CONSTANT_KEY;
if (lh_table_insert_w_hash(new_t, ent->k, ent->v, h, opts) != 0) if (lh_table_insert_w_hash(new_t, ent->k, ent->v, h, opts) != 0)
{ {
lh_table_free(new_t); lh_table_free(new_t);
@@ -599,7 +599,7 @@ int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, con
} }
t->table[n].k = k; t->table[n].k = k;
t->table[n].k_is_constant = (opts & JSON_C_OBJECT_KEY_IS_CONSTANT); t->table[n].k_is_constant = (opts & JSON_C_OBJECT_ADD_CONSTANT_KEY);
t->table[n].v = v; t->table[n].v = v;
t->count++; t->count++;

View File

@@ -16,8 +16,8 @@
* this is exposed by the json_object_get_object() function and within the * this is exposed by the json_object_get_object() function and within the
* json_object_iter type, it is not recommended for direct use. * json_object_iter type, it is not recommended for direct use.
*/ */
#ifndef _linkhash_h_ #ifndef _json_c_linkhash_h_
#define _linkhash_h_ #define _json_c_linkhash_h_
#include "json_object.h" #include "json_object.h"
@@ -80,64 +80,84 @@ typedef unsigned long(lh_hash_fn)(const void *k);
typedef int(lh_equal_fn)(const void *k1, const void *k2); typedef int(lh_equal_fn)(const void *k1, const void *k2);
/** /**
* An entry in the hash table * An entry in the hash table. Outside of linkhash.c, treat this as opaque.
*/ */
struct lh_entry struct lh_entry
{ {
/** /**
* The key. Use lh_entry_k() instead of accessing this directly. * The key.
* @deprecated Use lh_entry_k() instead of accessing this directly.
*/ */
const void *k; const void *k;
/** /**
* A flag for users of linkhash to know whether or not they * A flag for users of linkhash to know whether or not they
* need to free k. * need to free k.
* @deprecated use lh_entry_k_is_constant() instead.
*/ */
int k_is_constant; int k_is_constant;
/** /**
* The value. Use lh_entry_v() instead of accessing this directly. * The value.
* @deprecated Use lh_entry_v() instead of accessing this directly.
*/ */
const void *v; const void *v;
/** /**
* The next entry * The next entry.
* @deprecated Use lh_entry_next() instead of accessing this directly.
*/ */
struct lh_entry *next; struct lh_entry *next;
/** /**
* The previous entry. * The previous entry.
* @deprecated Use lh_entry_prev() instead of accessing this directly.
*/ */
struct lh_entry *prev; struct lh_entry *prev;
}; };
/** /**
* The hash table structure. * The hash table structure. Outside of linkhash.c, treat this as opaque.
*/ */
struct lh_table struct lh_table
{ {
/** /**
* Size of our hash. * Size of our hash.
* @deprecated do not use outside of linkhash.c
*/ */
int size; int size;
/** /**
* Numbers of entries. * Numbers of entries.
* @deprecated Use lh_table_length() instead.
*/ */
int count; int count;
/** /**
* The first entry. * The first entry.
* @deprecated Use lh_table_head() instead.
*/ */
struct lh_entry *head; struct lh_entry *head;
/** /**
* The last entry. * The last entry.
* @deprecated Do not use, may be removed in a future release.
*/ */
struct lh_entry *tail; struct lh_entry *tail;
/**
* Internal storage of the actual table of entries.
* @deprecated do not use outside of linkhash.c
*/
struct lh_entry *table; struct lh_entry *table;
/** /**
* A pointer onto the function responsible for freeing an entry. * A pointer to the function responsible for freeing an entry.
* @deprecated do not use outside of linkhash.c
*/ */
lh_entry_free_fn *free_fn; lh_entry_free_fn *free_fn;
/**
* @deprecated do not use outside of linkhash.c
*/
lh_hash_fn *hash_fn; lh_hash_fn *hash_fn;
/**
* @deprecated do not use outside of linkhash.c
*/
lh_equal_fn *equal_fn; lh_equal_fn *equal_fn;
}; };
typedef struct lh_table lh_table; typedef struct lh_table lh_table;
@@ -145,7 +165,7 @@ typedef struct lh_table lh_table;
/** /**
* Convenience list iterator. * Convenience list iterator.
*/ */
#define lh_foreach(table, entry) for (entry = table->head; entry; entry = entry->next) #define lh_foreach(table, entry) for (entry = lh_table_head(table); entry; entry = lh_entry_next(entry))
/** /**
* lh_foreach_safe allows calling of deletion routine while iterating. * lh_foreach_safe allows calling of deletion routine while iterating.
@@ -155,7 +175,7 @@ typedef struct lh_table lh_table;
* @param tmp a struct lh_entry * variable to hold a temporary pointer to the next element * @param tmp a struct lh_entry * variable to hold a temporary pointer to the next element
*/ */
#define lh_foreach_safe(table, entry, tmp) \ #define lh_foreach_safe(table, entry, tmp) \
for (entry = table->head; entry && ((tmp = entry->next) || 1); entry = tmp) for (entry = lh_table_head(table); entry && ((tmp = lh_entry_next(entry)) || 1); entry = tmp)
/** /**
* Create a new linkhash table. * Create a new linkhash table.
@@ -231,7 +251,7 @@ extern int lh_table_insert(struct lh_table *t, const void *k, const void *v);
* @param k a pointer to the key to insert. * @param k a pointer to the key to insert.
* @param v a pointer to the value to insert. * @param v a pointer to the value to insert.
* @param h hash value of the key to insert * @param h hash value of the key to insert
* @param opts if set to JSON_C_OBJECT_KEY_IS_CONSTANT, sets lh_entry.k_is_constant * @param opts if set to JSON_C_OBJECT_ADD_CONSTANT_KEY, sets lh_entry.k_is_constant
* so t's free function knows to avoid freeing the key. * so t's free function knows to avoid freeing the key.
*/ */
extern int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, extern int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v,
@@ -295,6 +315,9 @@ extern int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e);
*/ */
extern int lh_table_delete(struct lh_table *t, const void *k); extern int lh_table_delete(struct lh_table *t, const void *k);
/**
* Return the number of entries in the table.
*/
extern int lh_table_length(struct lh_table *t); extern int lh_table_length(struct lh_table *t);
/** /**
@@ -318,10 +341,19 @@ int lh_table_resize(struct lh_table *t, int new_size);
#define _LH_INLINE inline #define _LH_INLINE inline
#endif #endif
/**
* Return the first entry in the lh_table.
* @see lh_entry_next()
*/
static _LH_INLINE struct lh_entry *lh_table_head(const lh_table *t)
{
return t->head;
}
/** /**
* Calculate the hash of a key for a given table. * Calculate the hash of a key for a given table.
* *
* This is an exension to support functions that need to calculate * This is an extension to support functions that need to calculate
* the hash several times and allows them to do it just once and then pass * the hash several times and allows them to do it just once and then pass
* in the hash to all utility functions. Depending on use case, this can be a * in the hash to all utility functions. Depending on use case, this can be a
* considerable performance improvement. * considerable performance improvement.
@@ -334,7 +366,6 @@ static _LH_INLINE unsigned long lh_get_hash(const struct lh_table *t, const void
return t->hash_fn(k); return t->hash_fn(k);
} }
#undef _LH_INLINE
/** /**
* @deprecated Don't use this outside of linkhash.h: * @deprecated Don't use this outside of linkhash.h:
@@ -350,9 +381,22 @@ static _LH_INLINE unsigned long lh_get_hash(const struct lh_table *t, const void
* *
* lh_entry.k is const to indicate and help ensure that linkhash itself doesn't modify * lh_entry.k is const to indicate and help ensure that linkhash itself doesn't modify
* it, but callers are allowed to do what they want with it. * it, but callers are allowed to do what they want with it.
* See also lh_entry.k_is_constant * @see lh_entry_k_is_constant()
*/ */
#define lh_entry_k(entry) _LH_UNCONST((entry)->k) static _LH_INLINE void *lh_entry_k(const struct lh_entry *e)
{
return _LH_UNCONST(e->k);
}
/**
* Returns 1 if the key for the given entry is constant, and thus
* does not need to be freed when the lh_entry is freed.
* @see lh_table_insert_w_hash()
*/
static _LH_INLINE int lh_entry_k_is_constant(const struct lh_entry *e)
{
return e->k_is_constant;
}
/** /**
* Return a non-const version of lh_entry.v. * Return a non-const version of lh_entry.v.
@@ -360,7 +404,41 @@ static _LH_INLINE unsigned long lh_get_hash(const struct lh_table *t, const void
* v is const to indicate and help ensure that linkhash itself doesn't modify * v is const to indicate and help ensure that linkhash itself doesn't modify
* it, but callers are allowed to do what they want with it. * it, but callers are allowed to do what they want with it.
*/ */
#define lh_entry_v(entry) _LH_UNCONST((entry)->v) static _LH_INLINE void *lh_entry_v(const struct lh_entry *e)
{
return _LH_UNCONST(e->v);
}
/**
* Change the value for an entry. The caller is responsible for freeing
* the previous value.
*/
static _LH_INLINE void lh_entry_set_val(struct lh_entry *e, void *newval)
{
e->v = newval;
}
/**
* Return the next element, or NULL if there is no next element.
* @see lh_table_head()
* @see lh_entry_prev()
*/
static _LH_INLINE struct lh_entry *lh_entry_next(const struct lh_entry *e)
{
return e->next;
}
/**
* Return the previous element, or NULL if there is no previous element.
* @see lh_table_head()
* @see lh_entry_next()
*/
static _LH_INLINE struct lh_entry *lh_entry_prev(const struct lh_entry *e)
{
return e->prev;
}
#undef _LH_INLINE
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -10,7 +10,7 @@
* *
* Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved. * Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved.
* The copyrights to the contents of this file are licensed under the MIT License * The copyrights to the contents of this file are licensed under the MIT License
* (http://www.opensource.org/licenses/mit-license.php) * (https://www.opensource.org/licenses/mit-license.php)
*/ */
#include "config.h" #include "config.h"
@@ -91,7 +91,7 @@ static int printbuf_extend(struct printbuf *p, int min_size)
int printbuf_memappend(struct printbuf *p, const char *buf, int size) int printbuf_memappend(struct printbuf *p, const char *buf, int size)
{ {
/* Prevent signed integer overflows with large buffers. */ /* Prevent signed integer overflows with large buffers. */
if (size > INT_MAX - p->bpos - 1) if (size < 0 || size > INT_MAX - p->bpos - 1)
return -1; return -1;
if (p->size <= p->bpos + size + 1) if (p->size <= p->bpos + size + 1)
{ {
@@ -111,7 +111,7 @@ int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
if (offset == -1) if (offset == -1)
offset = pb->bpos; offset = pb->bpos;
/* Prevent signed integer overflows with large buffers. */ /* Prevent signed integer overflows with large buffers. */
if (len > INT_MAX - offset) if (len < 0 || offset < -1 || len > INT_MAX - offset)
return -1; return -1;
size_needed = offset + len; size_needed = offset + len;
if (pb->size < size_needed) if (pb->size < size_needed)
@@ -120,6 +120,8 @@ int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
return -1; return -1;
} }
if (pb->bpos < offset)
memset(pb->buf + pb->bpos, '\0', offset - pb->bpos);
memset(pb->buf + offset, charvalue, len); memset(pb->buf + offset, charvalue, len);
if (pb->bpos < size_needed) if (pb->bpos < size_needed)
pb->bpos = size_needed; pb->bpos = size_needed;
@@ -134,16 +136,16 @@ int sprintbuf(struct printbuf *p, const char *msg, ...)
int size; int size;
char buf[128]; char buf[128];
/* user stack buffer first */ /* use stack buffer first */
va_start(ap, msg); va_start(ap, msg);
size = vsnprintf(buf, 128, msg, ap); size = vsnprintf(buf, 128, msg, ap);
va_end(ap); va_end(ap);
/* if string is greater than stack buffer, then use dynamic string /* if string is greater than stack buffer, then use dynamic string
* with vasprintf. Note: some implementation of vsnprintf return -1 * with vasprintf. Note: some implementations of vsnprintf return -1
* if output is truncated whereas some return the number of bytes that * if output is truncated whereas some return the number of bytes that
* would have been written - this code handles both cases. * would have been written - this code handles both cases.
*/ */
if (size == -1 || size > 127) if (size < 0 || size > 127)
{ {
va_start(ap, msg); va_start(ap, msg);
if ((size = vasprintf(&t, msg, ap)) < 0) if ((size = vasprintf(&t, msg, ap)) < 0)
@@ -152,15 +154,14 @@ int sprintbuf(struct printbuf *p, const char *msg, ...)
return -1; return -1;
} }
va_end(ap); va_end(ap);
printbuf_memappend(p, t, size); size = printbuf_memappend(p, t, size);
free(t); free(t);
return size;
} }
else else
{ {
printbuf_memappend(p, buf, size); size = printbuf_memappend(p, buf, size);
return size;
} }
return size;
} }
void printbuf_reset(struct printbuf *p) void printbuf_reset(struct printbuf *p)

View File

@@ -10,21 +10,21 @@
* *
* Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved. * Copyright (c) 2008-2009 Yahoo! Inc. All rights reserved.
* The copyrights to the contents of this file are licensed under the MIT License * The copyrights to the contents of this file are licensed under the MIT License
* (http://www.opensource.org/licenses/mit-license.php) * (https://www.opensource.org/licenses/mit-license.php)
*/ */
/** /**
* @file * @file
* @brief Internal string buffer handing. Unless you're writing a * @brief Internal string buffer handling. Unless you're writing a
* json_object_to_json_string_fn implementation for use with * json_object_to_json_string_fn implementation for use with
* json_object_set_serializer() direct use of this is not * json_object_set_serializer() direct use of this is not
* recommended. * recommended.
*/ */
#ifndef _printbuf_h_ #ifndef _json_c_printbuf_h_
#define _printbuf_h_ #define _json_c_printbuf_h_
#ifndef JSON_EXPORT #ifndef JSON_EXPORT
#if defined(_MSC_VER) #if defined(_MSC_VER) && defined(JSON_C_DLL)
#define JSON_EXPORT __declspec(dllexport) #define JSON_EXPORT __declspec(dllexport)
#else #else
#define JSON_EXPORT extern #define JSON_EXPORT extern

View File

@@ -13,9 +13,23 @@
#include "config.h" #include "config.h"
#include "strerror_override.h" #include "strerror_override.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_BSD_STDLIB_H
#include <bsd/stdlib.h>
#endif
#define DEBUG_SEED(s) #define DEBUG_SEED(s)
#if defined(__APPLE__) || defined(__unix__) || defined(__linux__)
#define HAVE_DEV_RANDOM 1
#endif
#ifdef HAVE_ARC4RANDOM
#undef HAVE_GETRANDOM
#undef HAVE_DEV_RANDOM
#undef HAVE_CRYPTGENRANDOM
#endif
#if defined ENABLE_RDRAND #if defined ENABLE_RDRAND
/* cpuid */ /* cpuid */
@@ -155,9 +169,45 @@ retry:
#endif /* defined ENABLE_RDRAND */ #endif /* defined ENABLE_RDRAND */
/* has_dev_urandom */ #ifdef HAVE_GETRANDOM
#if defined(__APPLE__) || defined(__unix__) || defined(__linux__) #include <stdlib.h>
#ifdef HAVE_SYS_RANDOM_H
#include <sys/random.h>
#endif
static int get_getrandom_seed(int *seed)
{
DEBUG_SEED("get_getrandom_seed");
ssize_t ret;
do
{
ret = getrandom(seed, sizeof(*seed), GRND_NONBLOCK);
} while ((ret == -1) && (errno == EINTR));
if (ret == -1)
{
if (errno == ENOSYS) /* syscall not available in kernel */
return -1;
if (errno == EAGAIN) /* entropy not yet initialized */
return -1;
fprintf(stderr, "error from getrandom(): %s", strerror(errno));
return -1;
}
if (ret != sizeof(*seed))
return -1;
return 0;
}
#endif /* defined HAVE_GETRANDOM */
/* get_dev_random_seed */
#ifdef HAVE_DEV_RANDOM
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
@@ -167,43 +217,36 @@ retry:
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#define HAVE_DEV_RANDOM 1
static const char *dev_random_file = "/dev/urandom"; static const char *dev_random_file = "/dev/urandom";
static int has_dev_urandom(void) static int get_dev_random_seed(int *seed)
{
struct stat buf;
if (stat(dev_random_file, &buf))
{
return 0;
}
return ((buf.st_mode & S_IFCHR) != 0);
}
/* get_dev_random_seed */
static int get_dev_random_seed(void)
{ {
DEBUG_SEED("get_dev_random_seed"); DEBUG_SEED("get_dev_random_seed");
struct stat buf;
if (stat(dev_random_file, &buf))
return -1;
if ((buf.st_mode & S_IFCHR) == 0)
return -1;
int fd = open(dev_random_file, O_RDONLY); int fd = open(dev_random_file, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
fprintf(stderr, "error opening %s: %s", dev_random_file, strerror(errno)); fprintf(stderr, "error opening %s: %s", dev_random_file, strerror(errno));
exit(1); return -1;
} }
int r; ssize_t nread = read(fd, seed, sizeof(*seed));
ssize_t nread = read(fd, &r, sizeof(r));
if (nread != sizeof(r))
{
fprintf(stderr, "error short read %s: %s", dev_random_file, strerror(errno));
exit(1);
}
close(fd); close(fd);
return r;
if (nread != sizeof(*seed))
{
fprintf(stderr, "error short read %s: %s", dev_random_file, strerror(errno));
return -1;
}
return 0;
} }
#endif #endif
@@ -226,13 +269,10 @@ static int get_dev_random_seed(void)
#pragma comment(lib, "advapi32.lib") #pragma comment(lib, "advapi32.lib")
#endif #endif
static int get_time_seed(void); static int get_cryptgenrandom_seed(int *seed)
static int get_cryptgenrandom_seed(void)
{ {
HCRYPTPROV hProvider = 0; HCRYPTPROV hProvider = 0;
DWORD dwFlags = CRYPT_VERIFYCONTEXT; DWORD dwFlags = CRYPT_VERIFYCONTEXT;
int r;
DEBUG_SEED("get_cryptgenrandom_seed"); DEBUG_SEED("get_cryptgenrandom_seed");
@@ -243,34 +283,36 @@ static int get_cryptgenrandom_seed(void)
if (!CryptAcquireContextA(&hProvider, 0, 0, PROV_RSA_FULL, dwFlags)) if (!CryptAcquireContextA(&hProvider, 0, 0, PROV_RSA_FULL, dwFlags))
{ {
fprintf(stderr, "error CryptAcquireContextA 0x%08lx", GetLastError()); fprintf(stderr, "error CryptAcquireContextA 0x%08lx", GetLastError());
r = get_time_seed(); return -1;
} }
else else
{ {
BOOL ret = CryptGenRandom(hProvider, sizeof(r), (BYTE*)&r); BOOL ret = CryptGenRandom(hProvider, sizeof(*seed), (BYTE *)seed);
CryptReleaseContext(hProvider, 0); CryptReleaseContext(hProvider, 0);
if (!ret) if (!ret)
{ {
fprintf(stderr, "error CryptGenRandom 0x%08lx", GetLastError()); fprintf(stderr, "error CryptGenRandom 0x%08lx", GetLastError());
r = get_time_seed(); return -1;
} }
} }
return r; return 0;
} }
#endif #endif
/* get_time_seed */ /* get_time_seed */
#ifndef HAVE_ARC4RANDOM
#include <time.h> #include <time.h>
static int get_time_seed(void) static int get_time_seed(void)
{ {
DEBUG_SEED("get_time_seed"); DEBUG_SEED("get_time_seed");
return (int)time(NULL) * 433494437; return (unsigned)time(NULL) * 433494437;
} }
#endif
/* json_c_get_random_seed */ /* json_c_get_random_seed */
@@ -283,12 +325,31 @@ int json_c_get_random_seed(void)
if (has_rdrand()) if (has_rdrand())
return get_rdrand_seed(); return get_rdrand_seed();
#endif #endif
#ifdef HAVE_ARC4RANDOM
/* arc4random never fails, so use it if it's available */
return arc4random();
#else
#ifdef HAVE_GETRANDOM
{
int seed = 0;
if (get_getrandom_seed(&seed) == 0)
return seed;
}
#endif
#if defined HAVE_DEV_RANDOM && HAVE_DEV_RANDOM #if defined HAVE_DEV_RANDOM && HAVE_DEV_RANDOM
if (has_dev_urandom()) {
return get_dev_random_seed(); int seed = 0;
if (get_dev_random_seed(&seed) == 0)
return seed;
}
#endif #endif
#if defined HAVE_CRYPTGENRANDOM && HAVE_CRYPTGENRANDOM #if defined HAVE_CRYPTGENRANDOM && HAVE_CRYPTGENRANDOM
return get_cryptgenrandom_seed(); {
int seed = 0;
if (get_cryptgenrandom_seed(&seed) == 0)
return seed;
}
#endif #endif
return get_time_seed(); return get_time_seed();
#endif /* !HAVE_ARC4RANDOM */
} }

View File

@@ -94,7 +94,7 @@ char *_json_c_strerror(int errno_in)
} }
// It's not one of the known errno values, return the numeric value. // It's not one of the known errno values, return the numeric value.
for (ii = 0; errno_in > 10; errno_in /= 10, ii++) for (ii = 0; errno_in >= 10; errno_in /= 10, ii++)
{ {
digbuf[ii] = "0123456789"[(errno_in % 10)]; digbuf[ii] = "0123456789"[(errno_in % 10)];
} }
@@ -105,5 +105,6 @@ char *_json_c_strerror(int errno_in)
{ {
errno_buf[start_idx] = digbuf[ii]; errno_buf[start_idx] = digbuf[ii];
} }
errno_buf[start_idx] = '\0';
return errno_buf; return errno_buf;
} }

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
add_executable(test1Formatted test1.c parse_flags.c parse_flags.h) add_executable(test1Formatted test1.c parse_flags.c parse_flags.h)
target_compile_definitions(test1Formatted PRIVATE TEST_FORMATTED=1) target_compile_definitions(test1Formatted PRIVATE TEST_FORMATTED=1)
target_link_libraries(test1Formatted PRIVATE ${PROJECT_NAME}) target_link_libraries(test1Formatted PRIVATE ${PROJECT_NAME})
@@ -12,32 +12,38 @@ target_link_libraries(test2Formatted PRIVATE ${PROJECT_NAME})
include_directories(PUBLIC ${CMAKE_SOURCE_DIR}) include_directories(PUBLIC ${CMAKE_SOURCE_DIR})
foreach(TESTNAME set(ALL_TEST_NAMES
test1 test1
test2 test2
test4 test4
testReplaceExisting testReplaceExisting
test_cast test_cast
test_charcase test_charcase
test_compare test_compare
test_deep_copy test_deep_copy
test_double_serializer test_double_serializer
test_float test_float
test_int_add test_int_add
test_json_pointer test_locale
test_locale test_null
test_null test_parse
test_parse test_parse_int64
test_parse_int64 test_printbuf
test_printbuf test_set_serializer
test_set_serializer test_set_value
test_set_value test_strerror
test_util_file test_util_file
test_visit test_visit
test_object_iterator) test_object_iterator)
if (NOT DISABLE_JSON_POINTER)
set(ALL_TEST_NAMES ${ALL_TEST_NAMES} test_json_pointer)
endif()
foreach(TESTNAME ${ALL_TEST_NAMES})
add_executable(${TESTNAME} ${TESTNAME}.c) add_executable(${TESTNAME} ${TESTNAME}.c)
if(${TESTNAME} STREQUAL test_util_file) if(${TESTNAME} STREQUAL test_strerror OR ${TESTNAME} STREQUAL test_util_file)
# For output consistency, we need _json_c_strerror() in some tests: # For output consistency, we need _json_c_strerror() in some tests:
target_sources(${TESTNAME} PRIVATE ../strerror_override.c) target_sources(${TESTNAME} PRIVATE ../strerror_override.c)
endif() endif()

View File

@@ -1,9 +1,12 @@
#include <assert.h> #include <assert.h>
#include <limits.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "config.h"
#include "json.h" #include "json.h"
#include "parse_flags.h" #include "parse_flags.h"
@@ -307,6 +310,27 @@ int main(int argc, char **argv)
} }
printf("my_object.to_string()=%s\n", json_object_to_json_string(my_object)); printf("my_object.to_string()=%s\n", json_object_to_json_string(my_object));
json_object_put(my_array);
my_array = json_object_new_array_ext(INT_MIN + 1);
if (my_array != NULL)
{
printf("ERROR: able to allocate an array of negative size!\n");
fflush(stdout);
json_object_put(my_array);
my_array = NULL;
}
#if SIZEOF_SIZE_T == SIZEOF_INT
my_array = json_object_new_array_ext(INT_MAX / 2 + 2);
if (my_array != NULL)
{
printf("ERROR: able to allocate an array of insufficient size!\n");
fflush(stdout);
json_object_put(my_array);
my_array = NULL;
}
#endif
json_object_put(my_string); json_object_put(my_string);
json_object_put(my_int); json_object_put(my_int);
json_object_put(my_null); json_object_put(my_null);

View File

@@ -28,6 +28,11 @@ int main(int argc, char **argv)
\"int64_number\": 2147483649,\n\ \"int64_number\": 2147483649,\n\
\"negative_number\": -321321321,\n\ \"negative_number\": -321321321,\n\
\"a_null\": null,\n\ \"a_null\": null,\n\
\"empty_array\": [],\n\
\"nonempty_array\": [ 123 ],\n\
\"array_with_zero\": [ 0 ],\n\
\"empty_object\": {},\n\
\"nonempty_object\": { \"a\": 123 },\n\
}"; }";
/* Note: 2147483649 = INT_MAX + 2 */ /* Note: 2147483649 = INT_MAX + 2 */
/* Note: 9223372036854775809 = INT64_MAX + 2 */ /* Note: 9223372036854775809 = INT64_MAX + 2 */
@@ -49,6 +54,11 @@ int main(int argc, char **argv)
getit(new_obj, "int64_number"); getit(new_obj, "int64_number");
getit(new_obj, "negative_number"); getit(new_obj, "negative_number");
getit(new_obj, "a_null"); getit(new_obj, "a_null");
getit(new_obj, "empty_array");
getit(new_obj, "nonempty_array");
getit(new_obj, "array_with_zero");
getit(new_obj, "empty_object");
getit(new_obj, "nonempty_object");
// Now check the behaviour of the json_object_is_type() function. // Now check the behaviour of the json_object_is_type() function.
printf("\n================================\n"); printf("\n================================\n");

View File

@@ -7,6 +7,11 @@ Parsed input: {
"int64_number": 2147483649, "int64_number": 2147483649,
"negative_number": -321321321, "negative_number": -321321321,
"a_null": null, "a_null": null,
"empty_array": [],
"nonempty_array": [ 123 ],
"array_with_zero": [ 0 ],
"empty_object": {},
"nonempty_object": { "a": 123 },
} }
Result is not NULL Result is not NULL
new_obj.string_of_digits json_object_get_type()=string new_obj.string_of_digits json_object_get_type()=string
@@ -57,6 +62,36 @@ new_obj.a_null json_object_get_int64()=0
new_obj.a_null json_object_get_uint64()=0 new_obj.a_null json_object_get_uint64()=0
new_obj.a_null json_object_get_boolean()=0 new_obj.a_null json_object_get_boolean()=0
new_obj.a_null json_object_get_double()=0.000000 new_obj.a_null json_object_get_double()=0.000000
new_obj.empty_array json_object_get_type()=array
new_obj.empty_array json_object_get_int()=0
new_obj.empty_array json_object_get_int64()=0
new_obj.empty_array json_object_get_uint64()=0
new_obj.empty_array json_object_get_boolean()=0
new_obj.empty_array json_object_get_double()=0.000000
new_obj.nonempty_array json_object_get_type()=array
new_obj.nonempty_array json_object_get_int()=0
new_obj.nonempty_array json_object_get_int64()=0
new_obj.nonempty_array json_object_get_uint64()=0
new_obj.nonempty_array json_object_get_boolean()=0
new_obj.nonempty_array json_object_get_double()=0.000000
new_obj.array_with_zero json_object_get_type()=array
new_obj.array_with_zero json_object_get_int()=0
new_obj.array_with_zero json_object_get_int64()=0
new_obj.array_with_zero json_object_get_uint64()=0
new_obj.array_with_zero json_object_get_boolean()=0
new_obj.array_with_zero json_object_get_double()=0.000000
new_obj.empty_object json_object_get_type()=object
new_obj.empty_object json_object_get_int()=0
new_obj.empty_object json_object_get_int64()=0
new_obj.empty_object json_object_get_uint64()=0
new_obj.empty_object json_object_get_boolean()=0
new_obj.empty_object json_object_get_double()=0.000000
new_obj.nonempty_object json_object_get_type()=object
new_obj.nonempty_object json_object_get_int()=0
new_obj.nonempty_object json_object_get_int64()=0
new_obj.nonempty_object json_object_get_uint64()=0
new_obj.nonempty_object json_object_get_boolean()=0
new_obj.nonempty_object json_object_get_double()=0.000000
================================ ================================
json_object_is_type: null,boolean,double,int,object,array,string json_object_is_type: null,boolean,double,int,object,array,string

View File

@@ -124,7 +124,7 @@ static void test_example_get(void)
json_object_put(jo1); json_object_put(jo1);
} }
/* I'm not too happy with the RFC example to test the recusion of the json_pointer_get() function */ /* I'm not too happy with the RFC example to test the recursion of the json_pointer_get() function */
static void test_recursion_get(void) static void test_recursion_get(void)
{ {
struct json_object *jo2, *jo1 = json_tokener_parse(rec_input_json_str); struct json_object *jo2, *jo1 = json_tokener_parse(rec_input_json_str);

11
tests/test_strerror.c Normal file
View File

@@ -0,0 +1,11 @@
#include "strerror_override.h"
#include "strerror_override_private.h"
#include <stdio.h>
int main(int argc, char **argv)
{
puts(strerror(10000));
puts(strerror(999));
return 0;
}

View File

@@ -0,0 +1,2 @@
ERRNO=10000
ERRNO=999

1
tests/test_strerror.test Symbolic link
View File

@@ -0,0 +1 @@
test_basic.test

View File

@@ -4,7 +4,7 @@ OK: correctly unable to parse contents of valid_nested.json with low max depth:
OK: json_object_from_file(./not_present.json) correctly returned NULL: json_object_from_file: error opening file ./not_present.json: ERRNO=ENOENT OK: json_object_from_file(./not_present.json) correctly returned NULL: json_object_from_file: error opening file ./not_present.json: ERRNO=ENOENT
OK: json_object_from_fd(closed_fd), expecting NULL, EBADF, got:NULL, json_object_from_fd: error reading fd 10: ERRNO=EBADF OK: json_object_from_fd(closed_fd), expecting NULL, EBADF, got:NULL, json_object_from_fd_ex: error reading fd 10: ERRNO=EBADF
OK: json_object_to_file(json.out, jso)=0 OK: json_object_to_file(json.out, jso)=0
file[json.out], size=336, contents={"foo":1234,"foo1":"abcdefghijklmnopqrstuvwxyz","foo2":"abcdefghijklmnopqrstuvwxyz","foo3":"abcdefghijklmnopqrstuvwxyz","foo4":"abcdefghijklmnopqrstuvwxyz","foo5":"abcdefghijklmnopqrstuvwxyz","foo6":"abcdefghijklmnopqrstuvwxyz","foo7":"abcdefghijklmnopqrstuvwxyz","foo8":"abcdefghijklmnopqrstuvwxyz","foo9":"abcdefghijklmnopqrstuvwxyz"} file[json.out], size=336, contents={"foo":1234,"foo1":"abcdefghijklmnopqrstuvwxyz","foo2":"abcdefghijklmnopqrstuvwxyz","foo3":"abcdefghijklmnopqrstuvwxyz","foo4":"abcdefghijklmnopqrstuvwxyz","foo5":"abcdefghijklmnopqrstuvwxyz","foo6":"abcdefghijklmnopqrstuvwxyz","foo7":"abcdefghijklmnopqrstuvwxyz","foo8":"abcdefghijklmnopqrstuvwxyz","foo9":"abcdefghijklmnopqrstuvwxyz"}

View File

@@ -8,6 +8,10 @@
#include "snprintf_compat.h" #include "snprintf_compat.h"
#ifndef WIN32
#include <stdarg.h>
#endif /* !defined(WIN32) */
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#if !defined(HAVE_VASPRINTF) #if !defined(HAVE_VASPRINTF)
@@ -16,6 +20,7 @@ static int vasprintf(char **buf, const char *fmt, va_list ap)
{ {
#ifndef WIN32 #ifndef WIN32
static char _T_emptybuffer = '\0'; static char _T_emptybuffer = '\0';
va_list ap2;
#endif /* !defined(WIN32) */ #endif /* !defined(WIN32) */
int chars; int chars;
char *b; char *b;
@@ -26,19 +31,21 @@ static int vasprintf(char **buf, const char *fmt, va_list ap)
} }
#ifdef WIN32 #ifdef WIN32
chars = _vscprintf(fmt, ap) + 1; chars = _vscprintf(fmt, ap);
#else /* !defined(WIN32) */ #else /* !defined(WIN32) */
/* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite /* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite
* our buffer like on some 64bit sun systems.... but hey, its time to move on * our buffer like on some 64bit sun systems... but hey, it's time to move on
*/ */
chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap) + 1; va_copy(ap2, ap);
if (chars < 0) chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap2);
{ va_end(ap2);
chars *= -1;
} /* CAW: old glibc versions have this problem */
#endif /* defined(WIN32) */ #endif /* defined(WIN32) */
if (chars < 0 || (size_t)chars + 1 > SIZE_MAX / sizeof(char))
{
return -1;
}
b = (char *)malloc(sizeof(char) * chars); b = (char *)malloc(sizeof(char) * ((size_t)chars + 1));
if (!b) if (!b)
{ {
return -1; return -1;