Add a test_cast test case. This checks that the casting that is implied when calling the various json_object_get_FOO() functions on a differently typed object works correctly.
Fix a bug in json_object_get_int() where calling it on a string type object would always return 0, instead of the actual numerical value of the string.
ehaszla [Tue, 7 Dec 2010 18:15:35 +0000 (18:15 +0000)]
Simplify things by storing integer values only as int64_t's internally, and
omit the range check during parsing since we already have the checks when
accessing the value. There is no longer a json_type_int64, only json_type_int.
Fix some problems with parsing 0 and -0 values, and add a couple of tests.
Fix some minor compile issues on HPUX environments.
Michael Clark [Wed, 6 Oct 2010 16:39:20 +0000 (16:39 +0000)]
* Add int64 support. Two new functions json_object_net_int64 and
json_object_get_int64. Binary compatibility preserved.
Eric Haszlakiewicz, EHASZLA at transunion com
Rui Miguel Silva Seabra, rms at 1407 dot org
Michael Clark [Thu, 27 Aug 2009 06:40:00 +0000 (06:40 +0000)]
* Fix subtle bug in linkhash where lookup could hang after all slots
were filled then successively freed.
Spotted by Jean-Marc Naud, j dash m at newtraxtech dot com
Michael Clark [Wed, 25 Feb 2009 02:31:32 +0000 (02:31 +0000)]
* Don't use this as a variable, so we can compile with a C++ compiler
* Add casts from void* to type of assignment when using malloc
* Add #ifdef __cplusplus guards to all of the headers
* Add typedefs for json_object, json_tokener, array_list, printbuf, lh_table
Michael Clark, <michael@metaparadigm.com>
Michael Clark [Wed, 25 Feb 2009 01:51:40 +0000 (01:51 +0000)]
* Null pointer dereference fix. Fix json_object_get_boolean strlen test
to not return TRUE for zero length string. Remove redundant includes.
Erik Hovland, erik at hovland dot org
Michael Clark [Fri, 7 Dec 2007 02:50:42 +0000 (02:50 +0000)]
Patch allows for json-c compile with -Werror and not fail due to
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
Geoffrey Young, geoff at modperlcookbook dot org
Michael Clark [Tue, 13 Mar 2007 08:26:26 +0000 (08:26 +0000)]
* Add escaping of backslash to json output
* Add escaping of foward slash on tokenizing and output
* Changes to internal tokenizer from using recursion to
using a depth state structure to allow incremental parsing
Michael Clark [Tue, 13 Mar 2007 08:26:25 +0000 (08:26 +0000)]
* Fix bug in escaping of control characters
Johan Bj�rklund, johbjo09 at kth dot se
* Remove include "config.h" from headers (should only
be included from .c files)
Michael Clark <michael@metaparadigm.com>
Michael Clark [Tue, 13 Mar 2007 08:26:23 +0000 (08:26 +0000)]
* Make headers C++ compatible by change *this to *obj
* Add ifdef C++ extern "C" to headers
* Use simpler definition of min and max in bits.h
Larry Lansing, llansing at fuzzynerd dot com
* Remove automake 1.6 requirement
* Move autogen commands into autogen.sh. Update README
* Remove error pointer special case for Windows
* Change license from LGPL to MIT
Michael Clark <michael@metaparadigm.com>
Michael Clark [Tue, 13 Mar 2007 08:26:22 +0000 (08:26 +0000)]
* Fix additional error case in object parsing
* Add back sign reversal in nested object parse as error pointer
value is negative, while error value is positive.
Michael Clark <michael@metaparadigm.com>
Michael Clark [Tue, 13 Mar 2007 08:26:21 +0000 (08:26 +0000)]
* fix pointer arithmetic bug for error pointer check in is_error() macro
* fix type passed to printbuf_memappend in json_tokener
* update autotools bootstrap instructions in README
Michael Clark <michael@metaparadigm.com>
Michael Clark [Tue, 13 Mar 2007 08:26:20 +0000 (08:26 +0000)]
* printbuf.c - C. Watford (christopher dot watford at gmail dot com)
Added a Win32/Win64 compliant implementation of vasprintf
* debug.c - C. Watford (christopher dot watford at gmail dot com)
Removed usage of vsyslog on Win32/Win64 systems, needs to be handled
by a configure script
* json_object.c - C. Watford (christopher dot watford at gmail dot com)
Added scope operator to wrap usage of json_object_object_foreach, this
needs to be rethought to be more ANSI C friendly
* json_object.h - C. Watford (christopher dot watford at gmail dot com)
Added Microsoft C friendly version of json_object_object_foreach
* json_tokener.c - C. Watford (christopher dot watford at gmail dot com)
Added a Win32/Win64 compliant implementation of strndup
* json_util.c - C. Watford (christopher dot watford at gmail dot com)
Added cast and mask to suffice size_t v. unsigned int conversion
correctness
* json_tokener.c - sign reversal issue on error info for nested object parse
spotted by Johan Bj�rklund (johbjo09 at kth.se)
* json_object.c - escape " in json_escape_str
* Change to automake and libtool to build shared and static library
Michael Clark <michael@metaparadigm.com>