summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Generate docs for the 0.15 releasejson-c-0.15-20200726json-c-0.15Eric Haszlakiewicz2020-07-2681-0/+16095
|
* Bump version to 0.15Eric Haszlakiewicz2020-07-262-8/+8
|
* Merge pull request #648 from MarcT512/rbfEric Hawicz2020-07-231-1/+1
|\ | | | | Fix "may be used uninitialized" Release build failure
| * Fix "may be used uninitialized" Release build failureMarc2020-07-231-1/+1
|/ | | Fixes https://github.com/json-c/json-c/issues/647
* Issue #594 - provide an OVERRIDE_GET_RANDOM_SEED cmake variable to override ↵Eric Haszlakiewicz2020-07-224-0/+9
| | | | | | | | json_c_get_random_seed() for embedded platforms where time(NULL) doesn't work. Example: mkdir build && cd build cmake -DOVERRIDE_GET_RANDOM_SEED='do { extern uint32_t getMsTicks(void); int ms = getMsTicks() * 433494437; return ms; } while(0)' ..
* Merge pull request #646 from pascal-cuoq/fix_645Eric Hawicz2020-07-211-1/+1
|\ | | | | Cast to unsigned char instead of int when calling tolower (Fixes #645)
| * Fixes #645Pascal Cuoq2020-07-211-1/+1
|/
* Update the ChangeLog with recent changes, in preparation for a 0.15 release.Eric Haszlakiewicz2020-07-201-10/+40
|
* Remove the obsolete config.h.win32Eric Haszlakiewicz2020-07-171-207/+0
|
* Fix a number of things with the generated docs, including translating ↵Eric Haszlakiewicz2020-07-174-441/+457
| | | | triple-backtick code blocks into a form doxygen understands.
* Add some more detail about how to use json-c in README.md.Eric Haszlakiewicz2020-07-171-1/+31
|
* Remove the THIS_FUNCTION_IS_DEPRECATED define, we stopped using it long ago.Eric Haszlakiewicz2020-07-171-10/+0
|
* Remove the obsolete README.json_object-split.md, and mark README.md as being ↵Eric Haszlakiewicz2020-07-122-16/+3
| | | | the doxygen mainpage.
* Issue #642: improve the docs for json_object_put() and json_object_get().Eric Haszlakiewicz2020-07-121-5/+27
|
* Expand the doc for json_object_array_get_idx() to explain that it does not ↵Eric Haszlakiewicz2020-07-121-1/+9
| | | | adjust refcounts.
* Issue #641: Add a cast to void * to address some theoretically undefined ↵Eric Haszlakiewicz2020-07-111-1/+1
| | | | printf behavior.
* Issue #642: improve docs for json_tokener.h and json_object_object_add().Eric Haszlakiewicz2020-07-112-9/+48
|
* Don't export json-c symbols starting with an underscore, put deprecated ↵Eric Haszlakiewicz2020-07-042-32/+51
| | | | | | exports into a "JSONC_PRIVATE" version, and note stuff to do during releases. See also PR #639 and issue #621
* Change the strerror_override handling to check $_JSON_C_STRERROR_OVERRIDE ↵Eric Haszlakiewicz2020-07-045-7/+11
| | | | instead of using a variable, so we don't need to export it.
* Merge pull request #639 from smcv/symbol-versionsEric Hawicz2020-07-042-0/+169
|\ | | | | build: Add a symbol version to all exported symbols
| * build: Add symbol versions to all exported symbolsSimon McVittie2020-07-012-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this version script, newly-linked binaries that depend on the json-c shared library will refer to its symbols in a versioned form, preventing their references from being resolved to a symbol of the same name exported by json-glib or libjansson if those libraries appear in dependency search order before json-c, which will usually result in a crash. This is necessary because ELF symbol resolution normally uses a single flat namespace, not a tree like Windows symbol resolution. At least one symbol (json_object_iter_next()) is exported by all three JSON libraries. Linking with -Bsymbolic is not enough to have this effect in all cases, because -Bsymbolic only affects symbol lookup within a shared object, for example when json_object_set_serializer() calls json_object_set_userdata(). It does not affect calls from external code into json-c, unless json-c was statically linked into the external caller. This change will also not prevent code that depends on json-glib or libjansson from finding json-c's symbols and crashing; to prevent that, a corresponding change in json-glib or libjansson would be needed. Adding a symbol-version is a backwards-compatible change, but once added, removing or changing the symbol-version on a symbol would be an incompatible change that requires a SONAME bump. Resolves: https://github.com/json-c/json-c/issues/621 (when combined with an equivalent change to libjansson). Signed-off-by: Simon McVittie <smcv@collabora.com>
* | Use constants referring to the signed integer types when setting SSIZE_T_MAX.Eric Haszlakiewicz2020-07-011-3/+3
|/ | | | | | 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.
* Replace one call to json_object_new_array() with json_object_new_array_ext() ↵Eric Haszlakiewicz2020-06-291-1/+1
| | | | to ensure it at least minimally works.
* Add doc comment for json_object_new_array_ext().Eric Haszlakiewicz2020-06-291-0/+7
|
* Fix code formattingEric Haszlakiewicz2020-06-292-14/+9
|
* Make sure TEST_PARSE_CHUNKSIZE is valid if it's set.Eric Haszlakiewicz2020-06-291-0/+1
|
* In the json_tokener_state_number case, explicitly adjust what "number" ↵Eric Haszlakiewicz2020-06-296-50/+92
| | | | | | 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().
* Fix incremental parsing of invalid numbers with exponents, such as "0e+-" ↵Eric Haszlakiewicz2020-06-276-17/+120
| | | | | | and "12.3E12E12", while still allowing "0e+" in non-strict mode. Deprecate the json_parse_double() function from json_util.h
* Issue #635: Fix "expression has no effect" warning in json_tokener.c by ↵Eric Haszlakiewicz2020-06-231-1/+1
| | | | casting to void.
* Fix memory leak in test_parse's single_incremental_parse().Eric Haszlakiewicz2020-06-221-0/+4
|
* Drop extra blank lines from arraylist.hEric Haszlakiewicz2020-06-211-2/+0
|
* Issue #616: Change the parsing of surrogate pairs in unicode escapes so it ↵Eric Haszlakiewicz2020-06-215-172/+172
| | | | 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.
* In test_parse, fix lengths passed during a couple of incremental tests.Eric Haszlakiewicz2020-06-212-5/+52
| | | | | 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.
* Rearrange the json_tokener_state_escape_unicode case in json_tokener to ↵Eric Haszlakiewicz2020-06-212-153/+160
| | | | | | 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).
* Update the json_tokener_parse_ex() docs to clarify that the final '\0' ↵Eric Haszlakiewicz2020-06-211-4/+11
| | | | character is to be included in length passed in.
* Merge pull request #633 from dota17/issue616Eric Hawicz2020-06-204-35/+113
|\ | | | | fix issue 616: support the surrogate pair in split file.
| * fix issue 616: support the surrogate pair in split file.dota172020-06-084-35/+113
| |
* | Add json_object_array_shrink() (and array_list_shrink()) and use it in ↵Eric Haszlakiewicz2020-06-206-3/+95
| | | | | | | | | | | | 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.
* | Merge pull request #632 from json-c/json_object-splitEric Hawicz2020-06-208-263/+457
|\ \ | | | | | | Json object split
| * | Reformat the json_object-split branch with clang-formatjson_object-splitEric Haszlakiewicz2020-06-162-39/+32
| | |
| * | Include unistd.h to fix the build on OSXEric Haszlakiewicz2020-06-142-0/+5
| | |
| * | Drop the _delete field from struct json_object and call the type-specific ↵Eric Haszlakiewicz2020-06-132-19/+30
| | | | | | | | | | | | delete functions directly from json_object_put. (Thanks @dota17 for the suggestion in PR #632!)
| * | Drop the useless "char data[1]" from struct json_object. Fix a typo in a ↵Eric Haszlakiewicz2020-06-132-2/+3
| | | | | | | | | | | | comment.
| * | Eliminate unnecessary cast that was added to test_double_serializer.Eric Haszlakiewicz2020-06-071-1/+1
| | |
| * | Summarize the changes from the json_object-split branch in the ChangeLog.Eric Haszlakiewicz2020-06-071-0/+7
| | |
| * | Move the ssize_t typedef from json_inttypes.h to json_object_private.h so as ↵Eric Haszlakiewicz2020-06-072-5/+5
| | | | | | | | | | | | not to affect publically exposed symbols.
| * | The split of json_object into type-specific sub-structures is now ↵Eric Haszlakiewicz2020-06-075-433/+89
| | | | | | | | | | | | | | | | | | functionally complete. Remove all of the temporary defines, structures, old compat fuctions, extra fields, etc... that were needed during the conversion to a split set of json_object_* structures.
| * | More fixes for old MSVC builds.Eric Haszlakiewicz2020-06-071-5/+5
| | |
| * | Fix typo in previous commit to check for SSIZE_T on MSVC.Eric Haszlakiewicz2020-06-071-2/+2
| | |
| * | Change CMakeLists.txt to look for SSIZE_T on MSVC too.Eric Haszlakiewicz2020-06-071-0/+5
| | |