]>
granicus.if.org Git - json-c/log
Eric Haszlakiewicz [Tue, 7 Jun 2016 02:59:38 +0000 (22:59 -0400)]
Merge pull request #230 from ebassi/master
Use stdint.h to check for size_t size
Eric Haszlakiewicz [Tue, 7 Jun 2016 02:55:44 +0000 (22:55 -0400)]
Merge pull request #233 from NeoRaider/size_t3
Include stddef.h in json_object.h
Eric Haszlakiewicz [Tue, 7 Jun 2016 02:54:40 +0000 (22:54 -0400)]
Merge pull request #234 from NeoRaider/userdata
Add public API to use userdata independently of custom serializer
Michael Clark [Mon, 6 Jun 2016 20:11:16 +0000 (08:11 +1200)]
Remove reference to svn.metaparadigm.com
svn.metaparadigm.com no longer exists so it is not possible to use source from there.
Matthias Schiffer [Sun, 29 May 2016 03:54:57 +0000 (05:54 +0200)]
Add public API to get and set userdata
Also, json_object_set_serializer is changed to respect the userdata
and user_delete parameters when to_string_func is NULL.
Matthias Schiffer [Sun, 29 May 2016 02:54:38 +0000 (04:54 +0200)]
Make default double serializer ignore userdata again
The user might want to use the userdata for something different, so the
serializer should ignore it by default.
Explicitly setting the serializer to json_object_double_to_json_string will
still make it interpret the userdata as a format string.
Matthias Schiffer [Sun, 29 May 2016 03:19:50 +0000 (05:19 +0200)]
Include stddef.h in json_object.h
It is needed for size_t.
Emmanuele Bassi [Mon, 23 May 2016 09:18:59 +0000 (10:18 +0100)]
Use stdint.h to check for size_t size
If we use json_inttypes.h we are going to fail when builddir != srcdir,
and since JSON_C_HAVE_INTTYPES_H is defined after the configure script
has run, including json_inttypes.h would be the equivalent on including
stdint.h anyway.
This fixes the build of json-c in the GNOME Continuous builder.
Eric Haszlakiewicz [Mon, 23 May 2016 03:02:34 +0000 (03:02 +0000)]
Issue #142: un-deprecate json_object_object_get(), but note why you might want to use json_object_object_get_ex() instead.
Eric Haszlakiewicz [Mon, 23 May 2016 02:37:09 +0000 (02:37 +0000)]
Issue #205: use _strdup instead of strdup on Windows.
Eric Haszlakiewicz [Mon, 23 May 2016 02:12:51 +0000 (02:12 +0000)]
Merge branch 'doctaweeks-fixes-for-upstream'
Eric Haszlakiewicz [Mon, 23 May 2016 02:10:58 +0000 (02:10 +0000)]
Fix a few places that needed adjustment for the size_t changes, including updating the range checks to use a calculated SIZE_T_MAX.
Eric Haszlakiewicz [Mon, 23 May 2016 02:08:28 +0000 (02:08 +0000)]
Merge branch 'fixes-for-upstream' of https://github.com/doctaweeks/json-c into doctaweeks-fixes-for-upstream
Eric Haszlakiewicz [Wed, 18 May 2016 20:10:27 +0000 (16:10 -0400)]
Merge pull request #193 from jplitza/master
Make serialization format of doubles configurable
Jan-Philipp Litza [Fri, 6 May 2016 14:12:44 +0000 (16:12 +0200)]
Export json_object_double_to_json_string() and use custom format string
Jan-Philipp Litza [Fri, 6 May 2016 14:12:19 +0000 (16:12 +0200)]
Fix code in docs for json_object_new_double_s()
Eric Haszlakiewicz [Sat, 30 Apr 2016 19:09:45 +0000 (19:09 +0000)]
Add tests for the json_object_array_del_idx() function.
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:53:16 +0000 (18:53 +0000)]
Merge branch 'Protovision-master'
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:52:47 +0000 (18:52 +0000)]
Merge branch 'master' of https://github.com/Protovision/json-c into Protovision-master
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:45:16 +0000 (14:45 -0400)]
Merge pull request #216 from Jehan/master
configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation.
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:44:29 +0000 (14:44 -0400)]
Merge pull request #218 from sevan/patch-1
Use a macro to indicate C99 to the compiler
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:44:05 +0000 (14:44 -0400)]
Merge pull request #219 from rouault/low_heap_robustness_fixes
Fix various potential null ptr deref and int32 overflows
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:42:16 +0000 (14:42 -0400)]
Merge pull request #220 from hschaa/master
Add utility function for comparing json_objects
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:40:30 +0000 (14:40 -0400)]
Merge pull request #222 from chenha0/master
Fix issue #221: JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly
Eric Haszlakiewicz [Sat, 30 Apr 2016 18:36:02 +0000 (14:36 -0400)]
Merge pull request #223 from minaguib/master
Clarify json_object_get_string documentation of NULL handling & return
Mina Naguib [Mon, 8 Feb 2016 01:55:25 +0000 (20:55 -0500)]
Clarify json_object_get_string documentation of NULL handling & returning
chenha0 [Thu, 21 Jan 2016 12:11:40 +0000 (20:11 +0800)]
Fix issue #221: JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly
Tests added.
Helmut Schaa [Wed, 13 Jan 2016 14:40:08 +0000 (15:40 +0100)]
Add some basic tests for verifying json_object_equal behavior
Do some basic checks on ints, doubles, strings, arrays and "complex" objects.
Helmut Schaa [Wed, 13 Jan 2016 14:40:02 +0000 (15:40 +0100)]
Add utility function for comparing json_objects
Even Rouault [Mon, 11 Jan 2016 11:15:54 +0000 (12:15 +0100)]
Fix various potential null ptr deref and int32 overflows
This fix errors that can happen when ingesting very large JSON files
when hitting the maximum heap size of the process.
Sevan Janiyan [Tue, 5 Jan 2016 11:43:17 +0000 (11:43 +0000)]
Use a macro to indicate C99 to the compiler
The [AC_PROG_CC_C99 macro](https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/C-Compiler.html) sets the complier to the C99 standard if the compiler does not default to such behaviour (albeit gnu99). This is better than specifically hardcoding flags
Jehan [Fri, 1 Jan 2016 17:35:14 +0000 (18:35 +0100)]
configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation.
AC_FUNC_REALLOC is messed up when cross-compiling, ending up in failed
build with "undefined reference to `rpl_realloc'" error.
AC_CHECK_FUNCS will work both with native and cross builds.
Eric Haszlakiewicz [Sat, 26 Dec 2015 21:42:18 +0000 (21:42 +0000)]
Add const qualifiers to several functions that don't modify the json_object.
Eric Haszlakiewicz [Wed, 9 Dec 2015 03:20:42 +0000 (21:20 -0600)]
Issue #137: remove config.h.in from change control.
Eric Haszlakiewicz [Wed, 9 Dec 2015 02:51:06 +0000 (20:51 -0600)]
Eric Haszlakiewicz [Mon, 30 Nov 2015 02:24:50 +0000 (21:24 -0500)]
Merge pull request #209 from rgerhards/fix-regression
fix regression from
2d549662be832da838aa063da2efa78ee3b99668
Eric Haszlakiewicz [Sun, 29 Nov 2015 02:00:30 +0000 (20:00 -0600)]
Fix issue #201: add a JSON_C_TO_STRING_NOSLASHESCAPE flag to turn off escaping of forward slashes.
Eric Haszlakiewicz [Sat, 28 Nov 2015 18:58:07 +0000 (13:58 -0500)]
Merge pull request #198 from unmole/master
Fix possible memory leak and remove superfluous NULL checks before free()
Daniel M. Weeks [Fri, 22 Aug 2014 16:16:45 +0000 (12:16 -0400)]
Use size_t for json object array ops
Daniel M. Weeks [Fri, 22 Aug 2014 14:56:59 +0000 (10:56 -0400)]
Use size_t for array list length and size
Rainer Gerhards [Thu, 19 Nov 2015 10:05:15 +0000 (11:05 +0100)]
fix regression from
2d549662be832da838aa063da2efa78ee3b99668
That commit introduced read-only keys, but when the hash table
was resized, that attribute was not preserved. This resulted in
an invalid free at time of table destruction.
Eric Haszlakiewicz [Sun, 15 Nov 2015 04:31:15 +0000 (23:31 -0500)]
Merge pull request #199 from Nzbuu/fix_vs_build
Fix build in Visual Studio
Eric Haszlakiewicz [Sun, 15 Nov 2015 04:30:38 +0000 (23:30 -0500)]
Merge pull request #200 from Nzbuu/ci_build
Add build scripts for CI platforms
James Myatt [Thu, 5 Nov 2015 13:50:30 +0000 (13:50 +0000)]
Appveyor: Visual Studio v140 no longer fails
James Myatt [Thu, 5 Nov 2015 13:41:42 +0000 (13:41 +0000)]
Appveyor: Create artefact with library and include files only
Eric Haszlakiewicz [Fri, 23 Oct 2015 02:16:40 +0000 (02:16 +0000)]
Use AX_APPEND_COMPILE_FLAGS() to check the various compile flags, such as -Wall, to ensure the compile supports.
Eric Haszlakiewicz [Thu, 22 Oct 2015 02:57:13 +0000 (02:57 +0000)]
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.
James Myatt [Fri, 9 Oct 2015 22:50:51 +0000 (23:50 +0100)]
Travis: add osx and clang builds
James Myatt [Fri, 9 Oct 2015 22:48:06 +0000 (23:48 +0100)]
Travis: skip install step
James Myatt [Fri, 9 Oct 2015 22:46:19 +0000 (23:46 +0100)]
Add Travis build script
James Myatt [Fri, 11 Sep 2015 12:03:36 +0000 (13:03 +0100)]
Appveyor: Allow failing builds against newest toolset
James Myatt [Fri, 11 Sep 2015 11:20:44 +0000 (12:20 +0100)]
Add initial version of Appveyor build script
James Myatt [Fri, 9 Oct 2015 22:24:55 +0000 (23:24 +0100)]
Fix build in Visual Studio
Anmol Sarma [Thu, 1 Oct 2015 08:44:03 +0000 (14:14 +0530)]
Remove superfluous NULL checks
Anmol Sarma [Thu, 1 Oct 2015 08:39:09 +0000 (14:09 +0530)]
Fix possible memory leak
Eric Haszlakiewicz [Tue, 29 Sep 2015 02:25:29 +0000 (22:25 -0400)]
Merge pull request #196 from rgerhards/improve-performance
Performance improvements
Rainer Gerhards [Wed, 23 Sep 2015 13:56:48 +0000 (15:56 +0200)]
more efficient handling for smalls strings inside json_object
smalls strings inside json_objects had a high overhead because dynamic
memory allocation was needed for each of them. This also meant that the
pointer needed to be updated. This is now changed so that small strings
can directly be stored inside the json_object. Note that on the regular
64 bit machines a pointer takes 8 bytes. So even without increasing
memory, we could store string up to 7 bytes directly inside the object.
The max size is configurable. I have selected up to 31 bytes (which
means a buffer of 32 including the NUL byte). This brings a 24-bytes
memory overhead, but I consider that still useful because the memory
allocator usually also has quite some overhead (16 bytes) for
dyn alloced memory blocks. In any case, the max buffer size can be
tweaked via #define.
Rainer Gerhards [Wed, 23 Sep 2015 10:40:57 +0000 (12:40 +0200)]
remove unneeded data items from hashtable code
These items were used for statistics tracking, but no code at all
exists to consume them. By removing them we save
a) space
because they counters required space, and did so in each and every
json object
b) performance
because calloc() needs to write less data and the counters are
no longer maintained; cache performance can be better, load
on OS main memory is lighter
We could conditionally enable/disable these counters, but I have not
done this they were really nowhere used and it looked more like a
left-over from the import of hashtable code.
Rainer Gerhards [Wed, 23 Sep 2015 09:12:13 +0000 (11:12 +0200)]
add perllike hash function for strings
This also adds a new API json_global_set_string_hash() which permits
to select the hash function. The default one is the only one that was
previously present. So there are no changes to existing apps, and the
new hash function needs to be explicitely be opted in. Especially for
smaller strings, the perllike functions seems to be around twice as
fast as the other one, with similarly good results in value distribution.
Rainer Gerhards [Wed, 23 Sep 2015 07:08:49 +0000 (09:08 +0200)]
add json_object_object_add_ex() API
This provides more control over some detail aspects, many
of which are performance related.
Rainer Gerhards [Tue, 22 Sep 2015 17:07:30 +0000 (19:07 +0200)]
reduce duplicate hash computation in json_object_object_add()
This can be a very considerable performance saver.
Eric Haszlakiewicz [Sun, 23 Aug 2015 04:08:14 +0000 (00:08 -0400)]
Fix doc for json_object_new_boolean() to indicate the correct value for TRUE (1).
Eric Haszlakiewicz [Sun, 23 Aug 2015 04:06:36 +0000 (00:06 -0400)]
Squash deprecated function warning by replacing json_object_object_get calls with json_object_object_get_ex in test_cast.
Eric Haszlakiewicz [Sun, 23 Aug 2015 03:59:49 +0000 (23:59 -0400)]
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.
Eric Haszlakiewicz [Sat, 22 Aug 2015 19:24:26 +0000 (15:24 -0400)]
Merge pull request #183 from cryogen/master
Apply compile warning fix to master branch
Eric Haszlakiewicz [Thu, 6 Aug 2015 03:19:19 +0000 (23:19 -0400)]
Merge pull request #186 from Virtual-Instruments/master
Syntax error
Jacob Alexander [Tue, 2 Jun 2015 20:59:50 +0000 (13:59 -0700)]
Syntax error
- ./configure would fail due to bad code generation
Eric Haszlakiewicz [Sun, 31 May 2015 19:10:13 +0000 (12:10 -0700)]
Merge pull request #174 from haata/master
Adding JSON_C_TO_STRING_PRETTY_TAB flag
Jacob Alexander [Mon, 23 Mar 2015 23:34:30 +0000 (16:34 -0700)]
Adding JSON_C_TO_STRING_PRETTY_TAB flag
- Tabs are easier to read for tired eyes and editor adjustable
Eric Haszlakiewicz [Wed, 27 May 2015 02:02:19 +0000 (19:02 -0700)]
Tell the compiler we're intentionally ignoring the return value from __sync_val_compare_and_swap().
Stuart Walsh [Tue, 31 Mar 2015 11:23:03 +0000 (12:23 +0100)]
Fix uninitialised variable compile warning, and also fix unused-when-used warning
Eric Haszlakiewicz [Sun, 10 May 2015 01:35:22 +0000 (21:35 -0400)]
Merge pull request #149 from cicku/patch-2
SONAME bump
Eric Haszlakiewicz [Sat, 9 May 2015 01:31:37 +0000 (21:31 -0400)]
Merge pull request #171 from Nzbuu/vs2010_build
Update configuration for VS2010 and win64
Eric Haszlakiewicz [Sat, 9 May 2015 01:19:48 +0000 (21:19 -0400)]
Merge pull request #182 from tpetazzoni/libm-fix
Link against libm when needed
Eric Haszlakiewicz [Sat, 9 May 2015 01:19:05 +0000 (21:19 -0400)]
Merge pull request #180 from yegorich/silent
Enable silent build by default
Thomas Petazzoni [Fri, 1 May 2015 10:52:18 +0000 (12:52 +0200)]
Link against libm when needed
In certain C libraries (e.g uClibc), isnan() and related functions are
implemented in libm, so json-c needs to link against it. This commit
therefore adds an AC_TRY_LINK() test to check whether a program
calling isnan() can be properly linked with no special flags. If not,
we assume linking against libm is needed.
The json-c.pc.in file is also adjusted so that in the case of static
linking against json-c, -lm is also used.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Yegor Yefremov [Sat, 25 Apr 2015 19:57:38 +0000 (21:57 +0200)]
Enable silent build by default
Mark Swoope [Thu, 2 Apr 2015 21:05:27 +0000 (14:05 -0700)]
Added array_list_del_idx and json_object_array_del_idx
James Myatt [Thu, 5 Feb 2015 16:38:47 +0000 (16:38 +0000)]
Build random_seed.c as well
James Myatt [Thu, 5 Feb 2015 16:15:06 +0000 (16:15 +0000)]
Add x64 build configurations
James Myatt [Thu, 5 Feb 2015 16:12:28 +0000 (16:12 +0000)]
Set CompileAsCpp flag (Required for vs2010/winsdk71)
Revert some project settings to defaults
James Myatt [Thu, 5 Feb 2015 16:02:58 +0000 (16:02 +0000)]
Update VS project to include current source files
James Myatt [Thu, 5 Feb 2015 15:59:19 +0000 (15:59 +0000)]
Use more appropriate casts
James Myatt [Thu, 5 Feb 2015 15:58:39 +0000 (15:58 +0000)]
Add missing include file to random_seed
James Myatt [Thu, 5 Feb 2015 15:58:12 +0000 (15:58 +0000)]
Define macros from inttypes.h when not available
James Myatt [Thu, 5 Feb 2015 15:57:14 +0000 (15:57 +0000)]
json_tokener requires INF and NAN
James Myatt [Thu, 5 Feb 2015 15:56:49 +0000 (15:56 +0000)]
Define INFINITY and NAN when missing
James Myatt [Thu, 5 Feb 2015 15:55:25 +0000 (15:55 +0000)]
Include config.h in linkhash so that HAVE_ENDIAN_H is defined (if available)
James Myatt [Thu, 5 Feb 2015 15:54:19 +0000 (15:54 +0000)]
Updated config for vs2010/winsdk71 as well as vs2013
Define JSON_C_HAVE_INTTYPES_H in json_config.h.win32 only
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:41:31 +0000 (22:41 -0500)]
Merge pull request #168 from bugness-chl/master
Tightening the number parsing algorithm
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:35:36 +0000 (22:35 -0500)]
Merge pull request #163 from sixlettervariables/fix-win32-build-problems
Fix Win32 build problems
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:12:49 +0000 (22:12 -0500)]
Merge pull request #144 from mhei/master
Introduce json_object_from_fd
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:10:10 +0000 (03:10 +0000)]
Slight style tweaks to the bsearch changest.
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:00:08 +0000 (22:00 -0500)]
Merge pull request #155 from LeSpocky/bsearch
add bsearch for arrays
Eric Haszlakiewicz [Wed, 4 Mar 2015 02:37:02 +0000 (21:37 -0500)]
Merge pull request #156 from jubalh/master
Remove trailing whitespaces
chl [Thu, 5 Feb 2015 00:34:10 +0000 (01:34 +0100)]
Tightening the number parsing algorithm
Some badly formated "numbers" could get partly parsed,
resulting in truncated results instead of raising an
error.
Examples :
'1.2.3' -> (double)1.2
'2015-01-15' -> (int)2015
This patch is not perfect (ex: input can still end with a 'E', which
is forbidden by json.org doc) but should avoid non-sensically
formated input.
Tests added.
Christopher Watford [Fri, 5 Dec 2014 15:27:44 +0000 (10:27 -0500)]
Adds json_config.h.win32 to project. Adds VS2k13 project.
Christopher Watford [Fri, 5 Dec 2014 15:22:36 +0000 (10:22 -0500)]
Fixes #160 'missing header file on windows'
Eric Haszlakiewicz [Sun, 14 Sep 2014 02:18:51 +0000 (22:18 -0400)]
Merge pull request #153 from LeSpocky/doc
improve doc for json_object_to_json_string()
Eric Haszlakiewicz [Sun, 14 Sep 2014 02:18:14 +0000 (22:18 -0400)]
Merge pull request #151 from mjchinn/json_type-comma
Remove json_type enum trailing comma