Eric Haszlakiewicz
33339ae595
Use json_visit() to clear the serializer data set when parsing so the output from test_parse reflects the actual values parsed.
2016-10-29 15:13:16 -04:00
Eric Haszlakiewicz
ecdc14f535
Add a json_c_visit() function to provide a way to iterate over a tree of json-c objects.
2016-10-29 15:01:20 -04:00
Eric Haszlakiewicz
7e12b9f47c
Fix broken key-order test in test_compare.
2016-10-10 00:13:39 -04:00
Eric Haszlakiewicz
80150a18d3
Merge pull request #272 from sgerbino/master
...
Allows for compilation with CMake on macOS
2016-10-08 13:13:33 -04:00
Eric Haszlakiewicz
818156f6f7
Merge pull request #277 from ALLTERCO/json_object_set_xxx
...
Json object set xxx
2016-10-08 12:08:53 -04:00
Eric Haszlakiewicz
36a28fcb0c
Issue #275 : fix out of bounds read when handling unicode surrogate pairs.
2016-10-05 23:15:51 -04:00
Eric Haszlakiewicz
5fd99e62ed
Merge pull request #273 from konoal/master
...
fixed wrong object name in json_object_all_values_equal
2016-09-28 08:08:01 -04:00
Eric Haszlakiewicz
5653bc61a4
Merge pull request #274 from pepevel/master
...
Support for 64 bit pointers on Windows
2016-09-28 08:05:50 -04:00
Eric Haszlakiewicz
9f9c3326fe
Merge pull request #267 from sixlettervariables/patch-1
...
Removes me as Win32 maintainer, because I'm not.
2016-09-12 18:19:26 -04:00
Eric Haszlakiewicz
ea1499a372
Issue #263 : add const so the prototype for json_object_object_add_ex() matches the definition.
2016-08-24 23:41:22 -04:00
Eric Haszlakiewicz
0fcf1d1ae7
Fix memory leak and inconsistent output (due to varying fd numbers) in test_util_file.
2016-08-20 23:06:22 -04:00
Eric Haszlakiewicz
5fccfed4f4
Issue #260 : add a check to prevent trivial loops in the object tree, even though it is up to the callers to avoid doing so in more complex cases.
2016-08-20 22:42:59 -04:00
Eric Haszlakiewicz
c4d060bf80
json_object_object_add_ex() should have shared code with json_object_object_add(), and been changed to return int at the same time the latter was. Do that now.
...
Also correct a couple of calls to _to_json_string to check the return value.
2016-08-20 22:42:59 -04:00
Eric Haszlakiewicz
e40505e489
Merge branch 'RyDroid-tests'
2016-08-13 09:17:25 -04:00
Eric Haszlakiewicz
61cd433131
Merge branch 'tests' of https://github.com/RyDroid/json-c into RyDroid-tests
...
Conflicts:
tests/test_util_file.c
2016-08-13 09:17:01 -04:00
Eric Haszlakiewicz
e076ae756d
Merge pull request #251 from RyDroid/editorconfig
...
Adding a file for EditorConfig
2016-08-13 08:31:57 -04:00
Eric Haszlakiewicz
4d62de3898
Revert bogus change to json_object_get() made in f40b08d8 that caused it to always return NULL. (Issue #259 )
...
Also undo NULL check in json_tokener_set_flags(): it's not at all valid toi
try to set flags on a NULL pointer, and doing so should not be silently
ignored.
2016-08-11 17:05:41 -04:00
Eric Haszlakiewicz
0ad87649d4
Merge pull request #255 from RyDroid/minor-c2
...
Minor changes in C source code
2016-08-10 15:06:30 -04:00
Eric Haszlakiewicz
9f9a9ac426
Merge pull request #252 from RyDroid/minor-no-c
...
Very minor changes not related to C source code
2016-08-09 07:39:27 -04:00
Eric Haszlakiewicz
71d0615e98
Merge branch 'jobol-issue-165'
2016-08-09 07:38:18 -04:00
Eric Haszlakiewicz
f3db59d990
Merge branch 'issue-165' of https://github.com/jobol/json-c into jobol-issue-165
...
Conflicts:
tests/test_util_file.c
2016-08-09 07:36:54 -04:00
Eric Haszlakiewicz
bc3e691a1e
Merge pull request #253 from RyDroid/cppcheck-travis
...
Adding a test with cppcheck for Travis CI
2016-08-08 22:57:56 -04:00
Eric Haszlakiewicz
51b011ce24
Merge pull request #249 from RyDroid/readme
...
Improving README
2016-08-08 22:53:33 -04:00
Eric Haszlakiewicz
d758f4a8a7
Add a brief style guide. Address Issue #257 .
2016-08-08 22:50:23 -04:00
Eric Haszlakiewicz
33ae9f5d44
Merge pull request #250 from RyDroid/gitignore
...
Improving .gitignore
2016-08-08 18:42:01 +00:00
Eric Haszlakiewicz
9688f343a5
Issue #246 : Include xlocale.h too, to get locale_t defined, since not all OSes include that in locale.h
2016-08-02 22:25:05 -04:00
Eric Haszlakiewicz
fa76e4a8c9
Issue #195 : Actually call uselocale() in the new locale handling code in json_tokener.
...
Also, be sure the right locale_t is freed if we fail on the second uselocale.
Finally, fix test_locale so it *doesn't* use json_object_to_json_string as
that will simple re-emit the original parsed string values.
2016-07-31 14:43:14 -04:00
Eric Haszlakiewicz
4091b9c87e
Issue #195 : use uselocale() instead of setlocale() in json_tokener to behave better in threaded environments.
2016-07-30 21:34:58 -04:00
Eric Haszlakiewicz
7d637362b7
Linux's %p format doesn't return "0x0" for NULL pointers, so switch to using %lx for consistency.
2016-07-30 15:09:51 -04:00
Eric Haszlakiewicz
deb9fa482d
Issue #240 : add arbitrary use of val's in foreach loops to squash warnings about unused variables.
2016-07-30 18:27:53 +00:00
Eric Haszlakiewicz
b366750e11
Merge pull request #239 from ploxiln/printbuf_empty
...
initialize null terminator of new printbuf
2016-07-16 13:49:08 -04:00
Eric Haszlakiewicz
2b255d0ebf
Fix absolute paths in test_util_file that vary depending on where it is run.
2016-06-27 04:30:10 +00:00
Eric Haszlakiewicz
b1d65b62db
Issue #113 : Add more files to EXTRA_DIST and a dist-hook to get distcheck to at least not fail.
2016-06-27 04:30:04 +00:00
Eric Haszlakiewicz
1071385896
Issue #113 : add "new" files to appropriate variables in Makefile, and note the need to run "make distcheck" as part of the release process.
...
Fix issues with the test script so it works under distcheck too.
2016-06-27 04:15:30 +00:00
Eric Haszlakiewicz
29005ef7b1
Merge pull request #238 from nagamalli9999/master
...
linkhash.c: optimised the table_free path
2016-06-26 23:09:42 -04:00
Eric Haszlakiewicz
29ef73f21d
Issue #189 : Eliminate use of MC_ERROR from json_util.c, and add a json_util_get_last_err() function to retrieve the error for those callers that care about it.
...
Add tests and descriptions for the functions in json_util.c
2016-06-26 02:20:33 +00:00
Eric Haszlakiewicz
595891729e
Issue #236 : Add -Wcast-qual and fix casts to retain constness.
...
To better distinguish between entry->k and entry->v being const within linkhash, but non-const outside, add lh_entry_v() and lh_entry_k() accessors.
Make lh_entry->k const.
2016-06-11 18:19:39 +00:00
Eric Haszlakiewicz
f285c0a2e5
Issue #175 : disable the fast-and-loose code in hashlittle() when running with AddressSanitizer.
2016-06-08 03:24:59 +00:00
Eric Haszlakiewicz
ae66b24369
Mention that we're aiming to follow RFC 7159 now.
...
Cause README.md to show up in Doxygen output as the main page.
2016-06-08 02:37:15 +00:00
Eric Haszlakiewicz
40de3c67cd
Merge pull request #232 from NeoRaider/size_t2
...
tests/tests1: fix printf format for size_t arguments
2016-06-07 16:47:40 -04:00
Eric Haszlakiewicz
a42caac805
Copy over note about the 0.12.1 release to the master branch.
2016-06-07 04:13:15 +00:00
Eric Haszlakiewicz
0539191d18
Check the __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{2,4,8} defines to decide whether to use __sync_val_compare_and_swap(), as described at https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
...
Also, fix the types of the variables when building on Windows.
Also, should address issue #214 .
2016-06-07 03:26:46 +00:00
Eric Haszlakiewicz
1eb5a700f9
Merge pull request #230 from ebassi/master
...
Use stdint.h to check for size_t size
2016-06-06 22:59:38 -04:00
Eric Haszlakiewicz
e61eb409fd
Merge pull request #233 from NeoRaider/size_t3
...
Include stddef.h in json_object.h
2016-06-06 22:55:44 -04:00
Eric Haszlakiewicz
ce7ad480f4
Merge pull request #234 from NeoRaider/userdata
...
Add public API to use userdata independently of custom serializer
2016-06-06 22:54:40 -04:00
Eric Haszlakiewicz
7ae5c3f7a6
Issue #142 : un-deprecate json_object_object_get(), but note why you might want to use json_object_object_get_ex() instead.
2016-05-23 03:02:34 +00:00
Eric Haszlakiewicz
5e4e5f7d9d
Issue #205 : use _strdup instead of strdup on Windows.
2016-05-23 02:37:09 +00:00
Eric Haszlakiewicz
f4ca1325ae
Merge branch 'doctaweeks-fixes-for-upstream'
2016-05-23 02:12:51 +00:00
Eric Haszlakiewicz
996be85843
Fix a few places that needed adjustment for the size_t changes, including updating the range checks to use a calculated SIZE_T_MAX.
2016-05-23 02:10:58 +00:00
Eric Haszlakiewicz
9a2915ce66
Merge branch 'fixes-for-upstream' of https://github.com/doctaweeks/json-c into doctaweeks-fixes-for-upstream
2016-05-23 02:08:28 +00:00
Eric Haszlakiewicz
b2c5969aff
Merge pull request #193 from jplitza/master
...
Make serialization format of doubles configurable
2016-05-18 16:10:27 -04:00
Eric Haszlakiewicz
3345b25962
Add tests for the json_object_array_del_idx() function.
2016-04-30 19:09:45 +00:00
Eric Haszlakiewicz
9edf2418e0
Merge branch 'Protovision-master'
2016-04-30 18:53:16 +00:00
Eric Haszlakiewicz
1fb87cd196
Merge branch 'master' of https://github.com/Protovision/json-c into Protovision-master
2016-04-30 18:52:47 +00:00
Eric Haszlakiewicz
e3fb74942a
Merge pull request #216 from Jehan/master
...
configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation.
2016-04-30 14:45:16 -04:00
Eric Haszlakiewicz
c6a97eb9ce
Merge pull request #218 from sevan/patch-1
...
Use a macro to indicate C99 to the compiler
2016-04-30 14:44:29 -04:00
Eric Haszlakiewicz
82bdbdba24
Merge pull request #219 from rouault/low_heap_robustness_fixes
...
Fix various potential null ptr deref and int32 overflows
2016-04-30 14:44:05 -04:00
Eric Haszlakiewicz
4e0c8b55fb
Merge pull request #220 from hschaa/master
...
Add utility function for comparing json_objects
2016-04-30 14:42:16 -04:00
Eric Haszlakiewicz
afa9f824e7
Merge pull request #222 from chenha0/master
...
Fix issue #221 : JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly
2016-04-30 14:40:30 -04:00
Eric Haszlakiewicz
02a2151b2b
Merge pull request #223 from minaguib/master
...
Clarify json_object_get_string documentation of NULL handling & return
2016-04-30 14:36:02 -04:00
Eric Haszlakiewicz
537f8bcbdb
Add const qualifiers to several functions that don't modify the json_object.
2015-12-26 21:42:18 +00:00
Eric Haszlakiewicz
882b7d95cc
Issue #137 : remove config.h.in from change control.
2015-12-08 21:20:42 -06:00
Eric Haszlakiewicz
980cdd61be
Merge commit '2be921d88376e78f84d79aafa6db2714da804e59'
2015-12-08 20:51:06 -06:00
Eric Haszlakiewicz
65be8275da
Merge pull request #209 from rgerhards/fix-regression
...
fix regression from 2d549662be
2015-11-29 21:24:50 -05:00
Eric Haszlakiewicz
316da85818
Fix issue #201 : add a JSON_C_TO_STRING_NOSLASHESCAPE flag to turn off escaping of forward slashes.
2015-11-28 20:00:30 -06:00
Eric Haszlakiewicz
5a6a378725
Merge pull request #198 from unmole/master
...
Fix possible memory leak and remove superfluous NULL checks before free()
2015-11-28 13:58:07 -05:00
Eric Haszlakiewicz
c97bbd3797
Merge pull request #199 from Nzbuu/fix_vs_build
...
Fix build in Visual Studio
2015-11-14 23:31:15 -05:00
Eric Haszlakiewicz
b82a51a5cd
Merge pull request #200 from Nzbuu/ci_build
...
Add build scripts for CI platforms
2015-11-14 23:30:38 -05:00
Eric Haszlakiewicz
80c1f69b9e
Use AX_APPEND_COMPILE_FLAGS() to check the various compile flags, such as -Wall, to ensure the compile supports.
2015-10-23 02:16:40 +00:00
Eric Haszlakiewicz
10d50aadf2
Remove the AC_FUNC_MALLOC check, since we don't depend on the malloc(0) behavior it checks for, and we don't provide a rpl_malloc() implementation anyway.
2015-10-22 02:57:13 +00:00
Eric Haszlakiewicz
12916e229c
Merge pull request #196 from rgerhards/improve-performance
...
Performance improvements
2015-09-28 22:25:29 -04:00
Eric Haszlakiewicz
1757a31750
Fix doc for json_object_new_boolean() to indicate the correct value for TRUE (1).
2015-08-23 00:08:14 -04:00
Eric Haszlakiewicz
d4f8f92eb0
Squash deprecated function warning by replacing json_object_object_get calls with json_object_object_get_ex in test_cast.
2015-08-23 00:06:36 -04:00
Eric Haszlakiewicz
93b1fe63e5
Add back in the __attribute__((__unused__)) that was lost in the previous commit.
...
It's needed to squash a "variable 'val' set but not used" warning.
2015-08-23 00:00:12 -04:00
Eric Haszlakiewicz
a8bbefbbb4
Merge pull request #183 from cryogen/master
...
Apply compile warning fix to master branch
2015-08-22 15:24:26 -04:00
Eric Haszlakiewicz
55530bfc0f
Merge pull request #186 from Virtual-Instruments/master
...
Syntax error
2015-08-05 23:19:19 -04:00
Eric Haszlakiewicz
b594c34f57
Merge pull request #174 from haata/master
...
Adding JSON_C_TO_STRING_PRETTY_TAB flag
2015-05-31 12:10:13 -07:00
Eric Haszlakiewicz
cd8bd7f617
Tell the compiler we're intentionally ignoring the return value from __sync_val_compare_and_swap().
2015-05-26 19:02:19 -07:00
Eric Haszlakiewicz
cbedf2f7ca
Merge pull request #149 from cicku/patch-2
...
SONAME bump
2015-05-09 21:35:22 -04:00
Eric Haszlakiewicz
e4fce5d6ae
Merge pull request #171 from Nzbuu/vs2010_build
...
Update configuration for VS2010 and win64
2015-05-08 21:31:37 -04:00
Eric Haszlakiewicz
e1eb298de1
Merge pull request #182 from tpetazzoni/libm-fix
...
Link against libm when needed
2015-05-08 21:19:48 -04:00
Eric Haszlakiewicz
82a1316f76
Merge pull request #180 from yegorich/silent
...
Enable silent build by default
2015-05-08 21:19:05 -04:00
Eric Haszlakiewicz
68d856f618
Merge pull request #168 from bugness-chl/master
...
Tightening the number parsing algorithm
2015-03-03 22:41:31 -05:00
Eric Haszlakiewicz
7e3a6c6b9d
Merge pull request #163 from sixlettervariables/fix-win32-build-problems
...
Fix Win32 build problems
2015-03-03 22:35:36 -05:00
Eric Haszlakiewicz
da62fca305
Merge pull request #144 from mhei/master
...
Introduce json_object_from_fd
2015-03-03 22:12:49 -05:00
Eric Haszlakiewicz
484ca368f0
Slight style tweaks to the bsearch changest.
2015-03-04 03:10:10 +00:00
Eric Haszlakiewicz
a500c1f0b5
Merge pull request #155 from LeSpocky/bsearch
...
add bsearch for arrays
2015-03-03 22:00:08 -05:00
Eric Haszlakiewicz
9db3099572
Merge pull request #156 from jubalh/master
...
Remove trailing whitespaces
2015-03-03 21:37:02 -05:00
Eric Haszlakiewicz
ec4879ac5b
Merge pull request #153 from LeSpocky/doc
...
improve doc for json_object_to_json_string()
2014-09-13 22:18:51 -04:00
Eric Haszlakiewicz
6ec6fdaf8c
Merge pull request #151 from mjchinn/json_type-comma
...
Remove json_type enum trailing comma
2014-09-13 22:18:14 -04:00
Eric Haszlakiewicz
2c722277ee
Merge pull request #150 from ams-cs/master
...
Fix build using MinGW.
2014-09-13 22:17:57 -04:00
Eric Haszlakiewicz
f88db708ac
Merge pull request #141 from AlexandruCostache/master
...
Removed duplicate check in random_seed test - bug #140
2014-09-13 22:14:44 -04:00
Eric Haszlakiewicz
d4e81f9ec8
Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated.
...
Eliminate all uses of bits.h within the json-c code.
2014-05-04 22:33:26 -04:00
Eric Haszlakiewicz
1da0599e0e
Fix the definition of the error_description() macro in bits.h now that json_tokener_errors[] is not exported.
2014-05-03 22:26:26 -04:00
Eric Haszlakiewicz
2149a04ca8
Check for failures when allocating memory; return NULL and set errno=ENOMEM in a few of those cases.
...
Thanks to Susant Sahani for pointing out some of these.
2014-04-19 20:33:05 -04:00
Eric Haszlakiewicz
795e9151a1
Add an empty README file to placate autoconf.
2014-04-19 20:22:44 -04:00
Eric Haszlakiewicz
4569e3e430
Fix minor typo in README file.
2014-04-19 20:11:05 -04:00
Eric Haszlakiewicz
40aab4c502
Merge pull request #133 from haneefmubarak/patch-1
...
Update and rename README to README.md
2014-04-19 20:10:10 -04:00
Eric Haszlakiewicz
332a594fd4
Merge pull request #132 from pkoretic/master
...
Remove unused variable 'size'
2014-04-19 20:05:06 -04:00
Eric Haszlakiewicz
fa54bd542e
Update the release checklist to include calculating the tarball checksums and updating the wiki.
2014-04-11 20:07:49 -04:00