Commit Graph

  • 00098efc96 Merge branch 'json-c:master' into master David McCann 2021-05-13 06:34:10 +01:00
  • 9b53c92ea3 Check __STDC_VERSION__ is defined before checking its value David McCann 2021-05-13 06:31:18 +01:00
  • cd7109f767 Merge pull request #696 from ssrlive/master Eric Hawicz 2021-05-01 15:21:31 -04:00
  • 78e390a261 Merge pull request #701 from commodo/configurable-opts Eric Hawicz 2021-04-17 17:26:49 -04:00
  • 8abeebc9b2 json_pointer: allow the feature to be disabled Alexandru Ardelean 2021-04-16 09:42:07 +03:00
  • 1f8b64f62c tests: CMakeLists.txt: move test names to variable Alexandru Ardelean 2021-04-16 09:32:07 +03:00
  • 94909840be Merge pull request #700 from Philosoph228/werror-fix Eric Hawicz 2021-04-14 22:38:36 -04:00
  • 9c0565100a random_seed: fix unused variable for win32 build Philosoph228 2021-04-13 00:12:35 +05:00
  • ba181548bc To avoid target exe file export JSON functions. ssrlive 2021-03-02 14:27:40 +08:00
  • 041cef434a Add a DISABLE_EXTRA_LIBS option to skip using libbsd, per @neheb's request on issue #692/commit 0f61f692. Eric Haszlakiewicz 2021-02-15 20:19:56 +00:00
  • 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. Eric Haszlakiewicz 2021-02-13 03:23:58 +00:00
  • 7c859c54e4 Merge pull request #694 from ihsinme/patch-1 Eric Hawicz 2021-02-06 17:25:24 -05:00
  • c456963110 Update json_object.c ihsinme 2021-02-05 18:58:20 +03:00
  • 0f61f6921b Iesue #692: use arc4random() if it's available (in libc on BSD systems, and libbsd on Linux). Eric Haszlakiewicz 2021-01-13 01:57:25 +00:00
  • 69d650528d Keep the doc directory in the nodoc release tarball, just exclude its contents. Eric Haszlakiewicz 2021-01-13 01:30:16 +00:00
  • 4754f47434 Merge pull request #674 from ploxiln/random_seed_err_continue Eric Hawicz 2021-01-12 20:22:54 -05:00
  • 1fcb9e476b Merge pull request #689 from neheb/patch-1 Eric Hawicz 2020-12-18 21:30:14 -05:00
  • 987d3b2c86 fix compilation with clang Rosen Penev 2020-12-17 19:59:37 -08:00
  • 0fd3b7d316 random_seed: on error, continue to next method Pierce Lopez 2020-10-07 01:22:30 -04:00
  • df27756491 Merge pull request #667 from stoeckmann/regression Eric Hawicz 2020-09-11 20:56:51 -04:00
  • 7af593c140 Fixed test1 regression. Tobias Stoeckmann 2020-09-11 21:09:40 +02:00
  • 785a94b7a2 Merge pull request #665 from stoeckmann/tokener Eric Hawicz 2020-08-24 09:51:41 -04:00
  • eb08a92218 Merge pull request #660 from stoeckmann/arraylist Eric Hawicz 2020-08-24 09:51:18 -04:00
  • 369e8477d2 Validate size arguments in arraylist functions. Tobias Stoeckmann 2020-08-22 12:06:15 +02:00
  • b4e72c2655 Merge pull request #664 from stoeckmann/string Eric Hawicz 2020-08-23 16:43:31 -04:00
  • f941931804 Merge pull request #663 from stoeckmann/strerror Eric Hawicz 2020-08-23 16:38:21 -04:00
  • 1bc7a6b223 Merge pull request #662 from stoeckmann/random Eric Hawicz 2020-08-23 16:34:40 -04:00
  • df62119b7f Prevent signed overflow in get_time_seed Tobias Stoeckmann 2020-08-22 13:23:23 +02:00
  • bcb6d7d347 Handle allocation failure in json_tokener_new_ex Tobias Stoeckmann 2020-08-22 13:18:10 +02:00
  • e50154f615 Cap string length at INT_MAX. Tobias Stoeckmann 2020-08-22 13:09:11 +02:00
  • 583911a66c Aligned comment in _json_object_new_string Tobias Stoeckmann 2020-08-22 13:07:45 +02:00
  • 4298431150 Properly format errnos in _json_c_strerror Tobias Stoeckmann 2020-08-22 11:35:50 +02:00
  • 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. Eric Haszlakiewicz 2020-08-17 14:55:54 +00:00
  • cf30cba4ac Merge pull request #657 from stoeckmann/getrandom Eric Hawicz 2020-08-15 15:01:41 -04:00
  • f052e42f56 Use GRND_NONBLOCK with getrandom. Tobias Stoeckmann 2020-08-15 15:41:41 +02:00
  • 104b408ee8 Merge pull request #656 from pogaram/fix-warnings Eric Hawicz 2020-08-14 16:57:32 -04:00
  • 0ffb384409 Fixed warnings Aram Poghosyan 2020-08-14 11:45:33 +04:00
  • 98b7ee93fd Merge pull request #655 from MarcT512/issue654 Eric Hawicz 2020-08-07 10:18:30 -04:00
  • 4e9e44e525 Fix read past end of buffer Marc 2020-08-07 10:49:45 +01:00
  • 8c7849e6e3 Eliminate use of ctype.h and replace isdigit() and tolower() with non-locale-sensitive approaches. Eric Haszlakiewicz 2020-08-02 04:06:44 +00:00
  • f3d8006d34 Neither vertical tab nor formfeed are considered whitespace per the JSON spec, remove them from is_ws_char(). Eric Haszlakiewicz 2020-08-02 03:59:56 +00:00
  • 8b43ff0c22 Merge the is_ws_char() and is_hex_char() changes to json_tokener from branch 'ramiropolla/for_upstream' (PR #464) Eric Haszlakiewicz 2020-08-02 02:54:36 +00:00
  • 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. Eric Haszlakiewicz 2020-08-02 02:23:01 +00:00
  • 56a89f902f Merge pull request #653 from lamby/966657-json-c-please-make-the-build-reproducible Eric Hawicz 2020-08-01 22:06:38 -04:00
  • 46eea84554 Make the documentation build reproducibly Chris Lamb 2020-08-01 11:26:53 +01:00
  • 88cce7b9c5 Merge pull request #651 from alanc/getrandom Eric Hawicz 2020-07-31 20:30:11 -04:00
  • 6cf4847796 Use getrandom() if available in json_c_get_random_seed Alan Coopersmith 2020-07-30 16:13:04 -07:00
  • 002411293d Issue #649: Drop the generated doc/Doxyfile when creating a release. Eric Haszlakiewicz 2020-07-28 03:52:22 +00:00
  • 66f8ca3c03 Merge pull request #650 from sartura/readme-update Eric Hawicz 2020-07-27 10:31:05 -04:00
  • 55bf2d365d README: fix spelling errors Jakov Smolic 2020-07-27 10:30:08 +02:00
  • 47189b5ff1 Include updating the json-c-current-releaes gh-pages symlink as part of the release process. Eric Haszlakiewicz 2020-07-26 15:51:07 +00:00
  • 9af901b5b5 Update the doc links to point at 0.15 Eric Haszlakiewicz 2020-07-26 15:30:48 +00:00
  • 13a1566d93 Add the 0.15 docs. Eric Haszlakiewicz 2020-07-26 15:28:38 +00:00
  • de02d09c32 Update the master branch to version 0.15.99 Eric Haszlakiewicz 2020-07-26 15:26:05 +00:00
  • 9021cdcdd0 Generate docs for the 0.15 release json-c-0.15-20200726 json-c-0.15 Eric Haszlakiewicz 2020-07-26 15:13:45 +00:00
  • 2d78acdbda Bump version to 0.15 Eric Haszlakiewicz 2020-07-26 15:10:07 +00:00
  • 870965e1ea Update AUTHORS, add issues_closed_for_0.15.md, tweak the release checklist slightly. Eric Haszlakiewicz 2020-07-24 03:17:13 +00:00
  • 616b1050b2 Merge pull request #648 from MarcT512/rbf Eric Hawicz 2020-07-23 22:26:58 -04:00
  • 4a23d3413d Fix "may be used uninitialized" Release build failure Marc 2020-07-23 18:19:12 +01:00
  • 730e3d044f Issue #594 - provide an OVERRIDE_GET_RANDOM_SEED cmake variable to override json_c_get_random_seed() for embedded platforms where time(NULL) doesn't work. Eric Haszlakiewicz 2020-07-22 02:25:03 +00:00
  • 64de4b6e9f Merge pull request #646 from pascal-cuoq/fix_645 Eric Hawicz 2020-07-21 21:24:59 -04:00
  • 1962ba7de3 Fixes #645 Pascal Cuoq 2020-07-21 17:54:26 +02:00
  • 024e835f4c Update the ChangeLog with recent changes, in preparation for a 0.15 release. Eric Haszlakiewicz 2020-07-20 03:39:01 +00:00
  • 78a0f2ea5d Remove the obsolete config.h.win32 Eric Haszlakiewicz 2020-07-17 03:47:28 +00:00
  • e46b9cdb7d Fix a number of things with the generated docs, including translating triple-backtick code blocks into a form doxygen understands. Eric Haszlakiewicz 2020-07-17 03:46:21 +00:00
  • 9a7de35b92 Add some more detail about how to use json-c in README.md. Eric Haszlakiewicz 2020-07-17 03:42:38 +00:00
  • cb10a13e94 Remove the THIS_FUNCTION_IS_DEPRECATED define, we stopped using it long ago. Eric Haszlakiewicz 2020-07-17 03:20:29 +00:00
  • 6a0b2d669f Fix typoes with previous change. Eric Haszlakiewicz 2020-07-12 19:17:59 +00:00
  • 2508109b18 Remove the obsolete README.json_object-split.md, and mark README.md as being the doxygen mainpage. Eric Haszlakiewicz 2020-07-12 19:16:19 +00:00
  • fe480073f7 Add a "json-c-current-release" link pointing at json-c-0.14. Eric Haszlakiewicz 2020-07-12 19:13:50 +00:00
  • 4d9f6dd22e Issue #642: improve the docs for json_object_put() and json_object_get(). Eric Haszlakiewicz 2020-07-12 18:43:27 +00:00
  • 2330c6f0de Expand the doc for json_object_array_get_idx() to explain that it does not adjust refcounts. Eric Haszlakiewicz 2020-07-12 17:55:46 +00:00
  • 6542d33cd1 Issue #641: Add a cast to void * to address some theoretically undefined printf behavior. Eric Haszlakiewicz 2020-07-11 15:03:00 +00:00
  • 10a9ac245e Issue #642: improve docs for json_tokener.h and json_object_object_add(). Eric Haszlakiewicz 2020-07-11 04:04:58 +00:00
  • 6fa8b7ff42 Don't export json-c symbols starting with an underscore, put deprecated exports into a "JSONC_PRIVATE" version, and note stuff to do during releases. See also PR #639 and issue #621 Eric Haszlakiewicz 2020-07-04 18:58:56 +00:00
  • 6068d3f6d1 Change the strerror_override handling to check $_JSON_C_STRERROR_OVERRIDE instead of using a variable, so we don't need to export it. Eric Haszlakiewicz 2020-07-04 18:56:15 +00:00
  • b01d50b8dc Merge pull request #639 from smcv/symbol-versions Eric Hawicz 2020-07-04 14:26:20 -04:00
  • c2c94024f5 build: Add symbol versions to all exported symbols Simon McVittie 2020-06-29 18:16:34 +01:00
  • 6465e74020 Use constants referring to the signed integer types when setting SSIZE_T_MAX. In practice, the sizes of the signed and unsigned integer types will almost cetainly be the same, but this is more correct. Pointed out in issue #638. Eric Haszlakiewicz 2020-07-01 00:34:46 +00:00
  • 34334e5d3f Replace one call to json_object_new_array() with json_object_new_array_ext() to ensure it at least minimally works. Eric Haszlakiewicz 2020-06-29 02:35:26 +00:00
  • 0b67caec1a Add doc comment for json_object_new_array_ext(). Eric Haszlakiewicz 2020-06-29 02:31:32 +00:00
  • a4e3700972 Fix code formatting Eric Haszlakiewicz 2020-06-29 02:31:18 +00:00
  • 5f3bf70f03 Make sure TEST_PARSE_CHUNKSIZE is valid if it's set. Eric Haszlakiewicz 2020-06-29 02:18:34 +00:00
  • f23486a321 In the json_tokener_state_number case, explicitly adjust what "number" characters are allowed based on the exact micro-state that we're in, and check for invalid following characters in a different way, to allow a valid json_type_number object to be returned at the top level. This causes previously failing strings like "123-456" to return a valid json_object with the appropriate value. If you care about the trailing content, call json_tokener_parse_ex() and check the parse end point with json_tokener_get_parse_end(). Eric Haszlakiewicz 2020-06-29 02:14:26 +00:00
  • 6eac6986c9 Fix incremental parsing of invalid numbers with exponents, such as "0e+-" and "12.3E12E12", while still allowing "0e+" in non-strict mode. Deprecate the json_parse_double() function from json_util.h Eric Haszlakiewicz 2020-06-27 15:32:19 +00:00
  • 84e6032883 Issue #635: Fix "expression has no effect" warning in json_tokener.c by casting to void. Eric Haszlakiewicz 2020-06-23 02:51:46 +00:00
  • 7a72805e34 Fix memory leak in test_parse's single_incremental_parse(). Eric Haszlakiewicz 2020-06-22 01:12:03 +00:00
  • 7d3c2d9fad Drop extra blank lines from arraylist.h Eric Haszlakiewicz 2020-06-21 18:30:40 +00:00
  • a68566bf6a Issue #616: Change the parsing of surrogate pairs in unicode escapes so it uses a couple of additional states instead of assuming the low surrogate is already present, to ensure that we correctly handle various cases of incremental parsing. Eric Haszlakiewicz 2020-06-21 18:17:40 +00:00
  • 197e372464 In test_parse, fix lengths passed during a couple of incremental tests. Add an optional way to use an incremental chunk size ($TEST_PARSE_CHUNKSIZE) for all of the single_basic_parse tests, in additional to the regular way. Eric Haszlakiewicz 2020-06-21 17:36:38 +00:00
  • 36118b681e Rearrange the json_tokener_state_escape_unicode case in json_tokener to simplify the code slightly and make it a bit easier to understand. While here, drop the utf8_replacement_char that is unnecesarily added if we run out of input in the middle of a unicode escape. No other functional changes (yet). Eric Haszlakiewicz 2020-06-21 03:10:55 +00:00
  • 50179fb09f Update the json_tokener_parse_ex() docs to clarify that the final '\0' character is to be included in length passed in. Eric Haszlakiewicz 2020-06-21 02:35:42 +00:00
  • da76ee26e7 Merge pull request #633 from dota17/issue616 Eric Hawicz 2020-06-20 22:33:17 -04:00
  • e26a1195f4 Add json_object_array_shrink() (and array_list_shrink()) and use it in json_tokener to minimize the amount of memory used. This results in a 39%-50% reduction in memory use (peak RSS, peak heap usage) on the jc-bench benchmark and 9% shorter runtime. Also add the json_object_new_array_ext, array_list_new2, and array_list_shrink functions. Eric Haszlakiewicz 2020-06-20 18:03:04 +00:00
  • 99bb2121c6 Merge pull request #632 from json-c/json_object-split Eric Hawicz 2020-06-20 13:04:32 -04:00
  • 0710c835a1 Reformat the json_object-split branch with clang-format json_object-split Eric Haszlakiewicz 2020-06-16 13:17:58 +00:00
  • 401b29c021 Merge pull request #634 from micahsnyder/json-c-fPIC Eric Hawicz 2020-06-14 17:56:35 -04:00
  • 60494684a1 Issue #508: -fPIC to link libjson-c.a with libs Micah Snyder 2020-06-14 12:01:48 -04:00
  • 9128ec49b1 Include unistd.h to fix the build on OSX Eric Haszlakiewicz 2020-06-14 03:11:44 +00:00
  • 5ebfeaedc5 Drop the _delete field from struct json_object and call the type-specific delete functions directly from json_object_put. (Thanks @dota17 for the suggestion in PR #632!) Eric Haszlakiewicz 2020-06-13 18:34:35 +00:00