Commit Graph

20 Commits

Author SHA1 Message Date
Jehiah Czebotar
a503ee8217 add json_tokener_parse_verbose, and return NULL on parser errors
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@62 327403b1-1117-474d-bef2-5cb71233fd97
2010-12-08 03:52:07 +00:00
ehaszla
252669cee6 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.


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@60 327403b1-1117-474d-bef2-5cb71233fd97
2010-12-07 18:15:35 +00:00
Michael Clark
c4dceae1c5 * 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



git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@56 327403b1-1117-474d-bef2-5cb71233fd97
2010-10-06 16:39:20 +00:00
Brent Miller
126ad95fc4 * Add handling of surrogate pairs
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@53 327403b1-1117-474d-bef2-5cb71233fd97
2009-08-20 06:50:22 +00:00
Michael Clark
7fb9b03ffd * Rename min and max so we can never clash with C or C++ std library
Ian Atha, thatha at yahoo-inc dot com



git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@43 327403b1-1117-474d-bef2-5cb71233fd97
2009-07-25 00:13:44 +00:00
Christopher Watford
b1a22ac85f Add const qualifier to the json_tokener_parse functions
Eric Haszlakiewicz, EHASZLA at transunion dot com



git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@42 327403b1-1117-474d-bef2-5cb71233fd97
2009-07-08 04:02:05 +00:00
Christopher Watford
543bb1431f Erik Hovland (3):
Fix any noticeable spelling or grammar errors.
      Make sure every va_start has a va_end.
      Check all pointers for validity.



git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@41 327403b1-1117-474d-bef2-5cb71233fd97
2009-07-08 03:46:10 +00:00
Michael Clark
95f55a761c optimizations to json_tokener_parse_ex(), printbuf_memappend()
-- Brent Miller, bdmiller at yahoo dash inc dot com


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@34 327403b1-1117-474d-bef2-5cb71233fd97
2009-04-27 08:16:58 +00:00
Michael Clark
aaec1ef3c5 * 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>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@33 327403b1-1117-474d-bef2-5cb71233fd97
2009-02-25 02:31:32 +00:00
Michael Clark
22dee7cb59 * 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


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@31 327403b1-1117-474d-bef2-5cb71233fd97
2009-02-25 01:51:40 +00:00
Michael Clark
e8de078806 * Fixed warning reported by adding -Wstrict-prototypes
-Wold-style-definition to the compilatin flags.
    Dotan Barak, dotanba at gmail dot com


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@30 327403b1-1117-474d-bef2-5cb71233fd97
2009-02-25 01:45:00 +00:00
Michael Clark
c8f4a6e7de * Fix bug with use of capital E in numbers with exponents
Mateusz Loskot, mateusz at loskot dot net
  * Add stddef.h include



git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@19 327403b1-1117-474d-bef2-5cb71233fd97
2007-12-07 02:44:24 +00:00
Michael Clark
dfaf670436 * Add macros to enable compiling out debug code
Geoffrey Young, geoff at modperlcookbook dot org


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@18 327403b1-1117-474d-bef2-5cb71233fd97
2007-10-25 02:26:00 +00:00
Michael Clark
a850f8e29e * 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


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@14 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:26 +00:00
Michael Clark
837240f75f * 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>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@12 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:25 +00:00
Michael Clark
f6a6e486ff * 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>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@10 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:23 +00:00
Michael Clark
0370baa74c * 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>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@8 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:22 +00:00
Michael Clark
7b899b6dc5 * 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>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@6 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:21 +00:00
Michael Clark
4504df7117 * 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>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@4 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:20 +00:00
Michael Clark
f0d08887b8 import of version 0.1
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@2 327403b1-1117-474d-bef2-5cb71233fd97
2007-03-13 08:26:18 +00:00