Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Eliminate unnecessary cast that was added to test_double_serializer. | Eric Haszlakiewicz | 2020-06-07 | 1 | -1/+1 |
| | |||||
* | The split of json_object into type-specific sub-structures is now ↵ | Eric Haszlakiewicz | 2020-06-07 | 2 | -5/+5 |
| | | | | | | 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. | ||||
* | Kick json_type_string out of struct json_object. | Eric Haszlakiewicz | 2020-06-07 | 1 | -0/+4 |
| | | | | | The default is now that string data is stored inline at the end of json_object, though to allow for json_object_set_string() to set a _longer_ string, we still need to allow for the possibility of a separate char * pointer. All json types have been split out now, next step it cleanup. | ||||
* | Kick json_type_int and json_type_double out of struct json_object. | Eric Haszlakiewicz | 2020-05-26 | 1 | -1/+1 |
| | | | | Clean up the code in json_object_new_* a bit by dropping unnecesary json_object_base variables. | ||||
* | Kick json_type_array out of struct json_object; re-enable the test_deep_copy ↵ | Eric Haszlakiewicz | 2020-05-25 | 1 | -2/+1 |
| | | | | test. | ||||
* | Start splitting struct json_object into multiple sub-types, as descibed at ↵ | Eric Haszlakiewicz | 2020-05-25 | 1 | -1/+2 |
| | | | | | | | | | | | | https://github.com/json-c/json-c/wiki/Proposal:-struct-json_object-split The current changes split out _only_ json_type_object, and thus have a number of hacks to allow the code to continue to build and work. Originally mentioned in issue #535. When complete, this will probably invalidate #552. This is likely to cause notable conflicts in any other significant un-merged changes, such as PR#620. | ||||
* | test_deep_copy: Fix assertion value. | Björn Esser | 2020-05-18 | 1 | -1/+1 |
| | |||||
* | tests: Fix test_double_serializer without thread-local storage. | Björn Esser | 2020-05-18 | 1 | -0/+1 |
| | |||||
* | Prevent truncation on custom double formatters. | Tobias Stoeckmann | 2020-05-16 | 2 | -1/+15 |
| | | | | | | | | | | | | | | | | | | | | | | | | A custom double formatter can lead to truncation of the rest of the JSON document. If a custom formatter completely fills the buffer used by snprintf with a trailing dot or comma and the formatting option JSON_C_TO_STRING_NOZERO has been specified, then an iterator moves past the ending '\0' (off-by-one buffer overflow) to set an additional '\0' and adds the first '\0' into the printbuf. Since '\0' will eventually be considered the terminating character of the complete printbuf result, all trailing characters are lost. This leads to an incomplete JSON string as can be seen with the test case. The off-by-one can be noticed if compiled with address sanitizer. Since this is a very special case and a malformed formatter could do way more harm and is the responsibility of the user of this library, this is just a protective measure to keep json-c code as robust as possible. | ||||
* | Improved support for IBM operating systems | David McCann | 2020-05-14 | 3 | -10/+10 |
| | | | | Fix compiler errors and warnings when building on IBM operating systems such as AIX and IBM i. | ||||
* | fix json_parse_uint64() usage of errno | Pierce Lopez | 2020-05-10 | 1 | -4/+4 |
| | | | | | introduced in #542 fixes #601 | ||||
* | Fix snprintf on windows problem for test4. | Eric Haszlakiewicz | 2020-05-10 | 1 | -0/+1 |
| | |||||
* | Re-format after recent change to fix linkhash. | Eric Haszlakiewicz | 2020-05-10 | 1 | -2/+1 |
| | |||||
* | Issue #599: Fix the backwards check in lh_table_insert_w_hash() that was ↵ | Eric Haszlakiewicz | 2020-05-10 | 2 | -0/+30 |
| | | | | | | preventing adding more than 11 objects. Add a test to check for this too. | ||||
* | Add a JSON_TOKENER_ALLOW_TRAILING_CHARS flag for json_tokener_set_flags() to ↵ | Eric Haszlakiewicz | 2020-04-21 | 2 | -1/+11 |
| | | | | allow multiple objects to be parsed from input even when JSON_TOKENER_STRICT is set. | ||||
* | Add an tok_flags field to explicitly specify tokener flags in test_parse and ↵ | Eric Haszlakiewicz | 2020-04-21 | 1 | -38/+26 |
| | | | | eliminate the previous bogus calls to json_tokener_set_flags() | ||||
* | Merge pull request #524 from dota17/addTestCase_obj_token | Eric Haszlakiewicz | 2020-04-15 | 6 | -3/+90 |
|\ | | | | | Increase coverage | ||||
| * | remove unsuitable case | dota17 | 2020-04-15 | 1 | -17/+0 |
| | | |||||
| * | clang-format two test_util_file.c and test_object_iterator.c | dota17 | 2020-04-14 | 2 | -16/+17 |
| | | |||||
| * | Increased the test coverage of json_util.c from 76% to 90.3%. | chenguoping | 2020-04-14 | 2 | -0/+47 |
| | | |||||
| * | Increased the test coverage of json_object_iterator.c from 0% to 100% | chenguoping | 2020-04-14 | 4 | -1/+57 |
| | | |||||
* | | clang-format test1.c | dota17 | 2020-04-14 | 1 | -11/+12 |
| | | |||||
* | | fix valgrind errors | chenguoping | 2020-04-14 | 1 | -2/+9 |
| | | |||||
* | | testcase for array_list | chenguoping | 2020-04-14 | 7 | -0/+130 |
|/ | |||||
* | Be verbose on failing json_c_version test. | Björn Esser | 2020-04-11 | 1 | -0/+8 |
| | |||||
* | Merge pull request #576 from besser82/topic/besser82/increase_coverage | Eric Haszlakiewicz | 2020-04-11 | 1 | -0/+6 |
|\ | | | | | Test coverage for json_c_version. | ||||
| * | Test coverage for json_c_version. | Björn Esser | 2020-04-11 | 1 | -0/+6 |
| | | |||||
* | | Remove multiple trailing newlines at EOF. | Björn Esser | 2020-04-11 | 1 | -1/+0 |
| | | |||||
* | | Clean trailing white-space. | Björn Esser | 2020-04-11 | 2 | -2/+2 |
|/ | |||||
* | Remove autoconf machinery, we're using cmake now. Update the release ↵ | Eric Haszlakiewicz | 2020-04-09 | 1 | -69/+0 |
| | | | | checklist to account for that, plus fill in other tasks and clean it up a bit. | ||||
* | clang-format the files | dota17 | 2020-04-03 | 22 | -629/+610 |
| | |||||
* | add the disabling formatting coments and adjust the partial code manuly | dota17 | 2020-04-03 | 2 | -28/+34 |
| | |||||
* | add test cases | dota17 | 2020-03-31 | 8 | -0/+87 |
| | |||||
* | Merge pull request #547 from dota17/assert_test | Eric Haszlakiewicz | 2020-03-03 | 3 | -5/+6 |
|\ | | | | | modify json-c default build type, and fix up the assert() errors in t… | ||||
| * | update testcase and delete debug -O0 build | dota17 | 2020-03-02 | 2 | -6/+2 |
| | | |||||
| * | modify json-c default build type, and fix up the assert() errors in testcase | dota17 | 2020-02-29 | 3 | -5/+10 |
| | | |||||
* | | update json_object.c and testcase, delete json_object_uint_inc() | dota17 | 2020-02-28 | 2 | -26/+0 |
| | | |||||
* | | modify partial functions and testcase, in order to support automatic ↵ | dota17 | 2020-02-28 | 4 | -3/+84 |
| | | | | | | | | conversion for int64/uint64 | ||||
* | | modify the json_object, replace c_int64/c_uint64 with struct{union{int64, ↵ | dota17 | 2020-02-27 | 2 | -14/+12 |
| | | | | | | | | uint64},...} | ||||
* | | add uint64 data to json-c | dota17 | 2020-02-25 | 12 | -26/+225 |
|/ | |||||
* | Issue #539: be sure to clean up at the end of test_set_value. | Eric Haszlakiewicz | 2020-02-14 | 1 | -0/+1 |
| | |||||
* | Issue #539: reset the serializer when json_object_set_double() is called and ↵ | Eric Haszlakiewicz | 2020-02-13 | 2 | -2/+9 |
| | | | | the current serializer is the one that json_object_new_double_s() used. | ||||
* | Merge pull request #531 from dota17/utf8test | Eric Haszlakiewicz | 2020-02-05 | 2 | -3/+68 |
|\ | | | | | validate utf-8 string | ||||
| * | update code | dota17 | 2020-01-20 | 2 | -24/+30 |
| | | |||||
| * | test utf8 | dota17 | 2020-01-10 | 2 | -1/+60 |
| | | |||||
* | | add json_object_new_null | dota17 | 2020-01-20 | 7 | -1/+11 |
| | | |||||
* | | Fix make check | Po-Chuan Hsieh | 2020-01-11 | 1 | -3/+3 |
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cc -DHAVE_CONFIG_H -I. -I.. -I.. -I../tests -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -D_GNU_SOURCE -D_REENTRANT -MT test_parse.o -MD -MP -MF .deps/test_parse.Tpo -c -o test_parse.o test_parse.c test_parse.c:256:14: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] { "null123" + 4, 4, 3, json_tokener_success, 1 }, ~~~~~~~~~~^~~ test_parse.c:256:14: note: use array indexing to silence this warning { "null123" + 4, 4, 3, json_tokener_success, 1 }, ^ & [ ] test_parse.c:258:12: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] { "nullx" + 4, 2, 0, json_tokener_error_parse_unexpected, 1 }, ~~~~~~~~^~~ test_parse.c:258:12: note: use array indexing to silence this warning { "nullx" + 4, 2, 0, json_tokener_error_parse_unexpected, 1 }, ^ & [ ] test_parse.c:260:25: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] { "{\"a\":1}{\"b\":2}" + 7, ~~~~~~~~~~~~~~~~~~~~~^~~ test_parse.c:260:25: note: use array indexing to silence this warning { "{\"a\":1}{\"b\":2}" + 7, ^ & [ ] 3 errors generated. *** Error code 1 Stop. | ||||
* | Merge pull request #526 from dota17/addTestCase_printbuf | Eric Haszlakiewicz | 2020-01-03 | 2 | -0/+7 |
|\ | | | | | Increased the test coverage of printbuf.c 82% to 92%. | ||||
| * | Increased the test coverage of printbuf.c 82% to 92%. | chenguoping | 2020-01-03 | 2 | -0/+7 |
| | | |||||
* | | Merge pull request #525 from dota17/addPointerTestcase | Eric Haszlakiewicz | 2020-01-03 | 2 | -0/+30 |
|\ \ | |/ |/| | update pointer test case |