Blame ChangeLog

Packit ea8578
Packit ea8578
0.13.1 (up to commit 0f814e5, 2018/03/04)
Packit ea8578
=========================================
Packit ea8578
Packit ea8578
* Bump the major version of the .so library generated up to 4.0 to avoid 
Packit ea8578
  conflicts because some downstream packagers of json-c had already done
Packit ea8578
  their own bump to ".so.3" for a much older 0.12 release.
Packit ea8578
* Add const size_t json_c_object_sizeof()
Packit ea8578
* Avoid invalid free (and thus a segfault) when ref_count gets < 0
Packit ea8578
* PR#394: fix handling of custom double formats that include a ".0"
Packit ea8578
* Avoid uninitialized variable warnings in json_object_object_foreach
Packit ea8578
* Issue #396: fix build for certain uClibc based systems.
Packit ea8578
* Add a top level fuzz directory for fuzzers run by OSS-Fuzz
Packit ea8578
Packit ea8578
0.13 (up to commit 5dae561, 2017/11/29)
Packit ea8578
=================================
Packit ea8578
Packit ea8578
This release, being three and a half years after the 0.12 branch (f84d9c),
Packit ea8578
   has quite a number of changes included.  The following is a sampling of
Packit ea8578
   the most significant ones.
Packit ea8578
Packit ea8578
Since the 0.12 release, 250 issues and pull requests have been closed.
Packit ea8578
See issues_closed_for_0.13.md for a complete list.
Packit ea8578
Packit ea8578
Packit ea8578
Deprecated and removed features:
Packit ea8578
--------------------------------
Packit ea8578
* All internal use of bits.h has been eliminated.  The file will be removed.
Packit ea8578
	Do not use: hexdigit(), error_ptr(), error_descrition() and it_error() 
Packit ea8578
* lh_abort() is deprecated.  It will be removed.
Packit ea8578
Packit ea8578
Behavior changes:
Packit ea8578
-----------------
Packit ea8578
* Tighten the number parsing algorithm to raise errors instead of truncating
Packit ea8578
     the results.  For example 12.3.4 or 2015-01-15, which now return null.
Packit ea8578
	 See commit 99d8fc
Packit ea8578
Packit ea8578
* Use size_t for array length and size.  Platforms where sizeof(size_t) != sizeof(int) may not be backwards compatible
Packit ea8578
	See commits 45c56b, 92e9a5 and others.
Packit ea8578
Packit ea8578
* Check for failue when allocating memory, returning NULL and errno=ENOMEM.
Packit ea8578
	 See commit 2149a04.
Packit ea8578
Packit ea8578
* Change json_object_object_add() return type from void to int, and will return -1 on failures, instead of exiting. (Note: this is not an ABI change)
Packit ea8578
Packit ea8578
New features:
Packit ea8578
-------------
Packit ea8578
* We're aiming to follow RFC 7159 now.
Packit ea8578
Packit ea8578
* Add a couple of additional option to json_object_to_json_string_ext:
Packit ea8578
	JSON_C_TO_STRING_PRETTY_TAB
Packit ea8578
	JSON_C_TO_STRING_NOSLASHESCAPE
Packit ea8578
Packit ea8578
* Add a json_object_object_add_ex() function to allow for performance
Packit ea8578
	improvements when certain constraints are known to be true.
Packit ea8578
Packit ea8578
* Make serialization format of doubles configurable, in two different ways:
Packit ea8578
	Call json_object_set_serializer with json_object_double_to_json_string and a custom
Packit ea8578
	 format on each double object, or
Packit ea8578
	Call json_c_set_serialization_double_format() to set a global or thread-wide format.
Packit ea8578
Packit ea8578
* Add utility function for comparing json_objects - json_object_equal()
Packit ea8578
Packit ea8578
* Add a way to copy entire object trees: json_object_deep_copy()
Packit ea8578
* Add json_object_set_<type> function to modify the value of existing json_object's
Packit ea8578
 without the need to recreate them.  Also add a json_object_int_inc function to
Packit ea8578
 adjust an int's value.
Packit ea8578
* Add support for JSON pointer, RFC 6901.  See json_pointer.h
Packit ea8578
* Add a json_util_get_last_err() function to retrieve the string describing the
Packit ea8578
 cause of errors, instead of printing to stderr.
Packit ea8578
* Add perllike hash function for strings, and json_global_set_string_hash() 8f8d03d
Packit ea8578
* Add a json_c_visit() function to provide a way to iterate over a tree of json-c objects.
Packit ea8578
Packit ea8578
Notable bug fixes and other improvements:
Packit ea8578
-----------------------------------------
Packit ea8578
* Make reference increment and decrement atomic to allow passing json objects between threads.
Packit ea8578
* Fix json_object_object_foreach to avoid uninitialized variable warnings.
Packit ea8578
* Improve performance by removing unneeded data items from hashtable code and reducing duplicate hash computation.
Packit ea8578
* Improve performance by storing small strings inside json_object
Packit ea8578
* Improve performance of json_object_to_json_string by removing variadic printf. commit 9ff0f49
Packit ea8578
* Issue #371: fix parsing of "-Infinity", and avoid needlessly copying the input when doing so.
Packit ea8578
* Fix stack buffer overflow in json_object_double_to_json_string_format() - commit 2c2deb87
Packit ea8578
* Fix various potential null ptr deref and int32 overflows
Packit ea8578
* Issue #332: fix a long-standing bug in array_list_put_idx() where it would attempt to free previously free'd entries due to not checking the current array length.
Packit ea8578
* Issue #195: use uselocale() instead of setlocale() in json_tokener to behave better in threaded environments.
Packit ea8578
* Issue #275: fix out of bounds read when handling unicode surrogate pairs.
Packit ea8578
* Ensure doubles that happen to be a whole number are emitted with ".0" - commit ca7a19
Packit ea8578
* PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated.
Packit ea8578
* Fix double to int cast overflow in json_object_get_int64.
Packit ea8578
* Clamp double to int32 when narrowing in json_object_get_int.
Packit ea8578
* Use strtoll() to parse ints - instead of sscanf
Packit ea8578
* Miscellaneous smaller changes, including removing unused variables, fixing warning
Packit ea8578
 about uninitialized variables adding const qualifiers, reformatting code, etc...
Packit ea8578
Packit ea8578
Build changes:
Packit ea8578
--------------
Packit ea8578
* Add Appveyor and Travis build support
Packit ea8578
* Switch to using CMake when building on Windows with Visual Studio.
Packit ea8578
	A dynamic .dll is generated instead of a .lib
Packit ea8578
	config.h is now generated, config.h.win32 should no longer be manually copied
Packit ea8578
* Add support for MacOS through CMake too.
Packit ea8578
* Enable silent build by default
Packit ea8578
* Link against libm when needed
Packit ea8578
* Add support for building with AddressSanitizer
Packit ea8578
* Add support for building with Clang
Packit ea8578
* Add a --enable-threading configure option, and only use the (slower) __sync_add_and_fetch()/__sync_sub_and_fetch() function when it is specified.
Packit ea8578
Packit ea8578
List of new functions added:
Packit ea8578
----------------------------
Packit ea8578
### json_object.h
Packit ea8578
* array_list_bsearch()
Packit ea8578
* array_list_del_idx()
Packit ea8578
* json_object_to_json_string_length()
Packit ea8578
* json_object_get_userdata()
Packit ea8578
* json_object_set_userdata()
Packit ea8578
* json_object_object_add_ex()
Packit ea8578
* json_object_array_bsearch()
Packit ea8578
* json_object_array_del_idx()
Packit ea8578
* json_object_set_boolean()
Packit ea8578
* json_object_set_int()
Packit ea8578
* json_object_int_inc()
Packit ea8578
* json_object_set_int64()
Packit ea8578
* json_c_set_serialization_double_format()
Packit ea8578
* json_object_double_to_json_string()
Packit ea8578
* json_object_set_double()
Packit ea8578
* json_object_set_string()
Packit ea8578
* json_object_set_string_len()
Packit ea8578
* json_object_equal()
Packit ea8578
* json_object_deep_copy()
Packit ea8578
Packit ea8578
### json_pointer.h
Packit ea8578
* json_pointer_get()
Packit ea8578
* json_pointer_getf()
Packit ea8578
* json_pointer_set()
Packit ea8578
* json_pointer_setf()
Packit ea8578
Packit ea8578
### json_util.h
Packit ea8578
* json_object_from_fd()
Packit ea8578
* json_object_to_fd()
Packit ea8578
* json_util_get_last_err()
Packit ea8578
Packit ea8578
### json_visit.h
Packit ea8578
* json_c_visit()
Packit ea8578
Packit ea8578
### linkhash.h
Packit ea8578
* json_global_set_string_hash()
Packit ea8578
* lh_table_resize()
Packit ea8578
Packit ea8578
### printbuf.h
Packit ea8578
* printbuf_strappend()
Packit ea8578
Packit ea8578
Packit ea8578
0.12.1
Packit ea8578
======
Packit ea8578
Packit ea8578
  * Minimal changes to address compile issues.
Packit ea8578
Packit ea8578
0.12
Packit ea8578
====
Packit ea8578
Packit ea8578
  * Address security issues:
Packit ea8578
    * CVE-2013-6371: hash collision denial of service
Packit ea8578
    * CVE-2013-6370: buffer overflow if size_t is larger than int
Packit ea8578
Packit ea8578
  * Avoid potential overflow in json_object_get_double
Packit ea8578
Packit ea8578
  * Eliminate the mc_abort() function and MC_ABORT macro.
Packit ea8578
Packit ea8578
  * Make the json_tokener_errors array local.  It has been deprecated for
Packit ea8578
     a while, and json_tokener_error_desc() should be used instead.
Packit ea8578
Packit ea8578
  * change the floating point output format to %.17g so values with 
Packit ea8578
     more than 6 digits show up in the output.
Packit ea8578
Packit ea8578
  * Remove the old libjson.so name compatibility support.  The library is
Packit ea8578
      only created as libjson-c.so now and headers are only installed 
Packit ea8578
      into the ${prefix}/json-c directory.
Packit ea8578
Packit ea8578
  * When supported by the linker, add the -Bsymbolic-functions flag.
Packit ea8578
Packit ea8578
  * Various changes to fix the build on MSVC.
Packit ea8578
Packit ea8578
  * Make strict mode more strict:
Packit ea8578
    * number must not start with 0
Packit ea8578
    * no single-quote strings
Packit ea8578
    * no comments
Packit ea8578
    * trailing char not allowed
Packit ea8578
    * only allow lowercase literals
Packit ea8578
Packit ea8578
  * Added a json_object_new_double_s() convenience function to allow
Packit ea8578
    an exact string representation of a double to be specified when
Packit ea8578
    creating the object and use it in json_tokener_parse_ex() so
Packit ea8578
    a re-serialized object more exactly matches the input.
Packit ea8578
Packit ea8578
  * Add support NaN and Infinity
Packit ea8578
Packit ea8578
Packit ea8578
0.11
Packit ea8578
====
Packit ea8578
Packit ea8578
  * IMPORTANT: the name of the library has changed to libjson-c.so and
Packit ea8578
     the header files are now in include/json-c.
Packit ea8578
     The pkgconfig name has also changed from json to json-c.
Packit ea8578
     You should change your build to use appropriate -I and -l options.
Packit ea8578
     A compatibility shim is in place so builds using the old name will
Packit ea8578
     continue to work, but that will be removed in the next release.
Packit ea8578
  * Maximum recursion depth is now a runtime option.
Packit ea8578
     json_tokener_new() is provided for compatibility.
Packit ea8578
     json_tokener_new_ex(depth)
Packit ea8578
  * Include json_object_iterator.h in the installed headers.
Packit ea8578
  * Add support for building on Android.
Packit ea8578
  * Rewrite json_object_object_add to replace just the value if the key already exists so keys remain valid.
Packit ea8578
  * Make it safe to delete keys while iterating with the json_object_object_foreach macro.
Packit ea8578
  * Add a json_set_serializer() function to allow the string output of a json_object to be customized.
Packit ea8578
  * Make float parsing locale independent.
Packit ea8578
  * Add a json_tokener_set_flags() function and a JSON_TOKENER_STRICT flag.
Packit ea8578
  * Enable -Werror when building.
Packit ea8578
  * speed improvements to parsing 64-bit integers on systems with working sscanf
Packit ea8578
  * Add a json_object_object_length function.
Packit ea8578
  * Fix a bug (buffer overrun) when expanding arrays to more than 64 entries.
Packit ea8578
Packit ea8578
0.10
Packit ea8578
====
Packit ea8578
Packit ea8578
  * Add a json_object_to_json_string_ext() function to allow output to be
Packit ea8578
     formatted in a more human readable form.
Packit ea8578
  * Add json_object_object_get_ex(), a NULL-safe get object method, to be able
Packit ea8578
     to distinguish between a key not present and the value being NULL.
Packit ea8578
  * Add an alternative iterator implementation, see json_object_iterator.h
Packit ea8578
  * Make json_object_iter public to enable external use of the
Packit ea8578
     json_object_object_foreachC macro.
Packit ea8578
  * Add a printbuf_memset() function to provide an effecient way to set and
Packit ea8578
     append things like whitespace indentation.
Packit ea8578
  * Adjust json_object_is_type and json_object_get_type so they return
Packit ea8578
      json_type_null for NULL objects and handle NULL passed to
Packit ea8578
      json_objct_object_get().
Packit ea8578
  * Rename boolean type to json_bool.
Packit ea8578
  * Fix various compile issues for Visual Studio and MinGW.
Packit ea8578
  * Allow json_tokener_parse_ex() to be re-used to parse multiple object.
Packit ea8578
     Also, fix some parsing issues with capitalized hexadecimal numbers and
Packit ea8578
     number in E notation.
Packit ea8578
  * Add json_tokener_get_error() and json_tokener_error_desc() to better 
Packit ea8578
     encapsulate the process of retrieving errors while parsing.
Packit ea8578
  * Various improvements to the documentation of many functions.
Packit ea8578
  * Add new json_object_array_sort() function.
Packit ea8578
  * Fix a bug in json_object_get_int(), which would incorrectly return 0
Packit ea8578
    when called on a string type object.
Packit ea8578
    Eric Haszlakiewicz
Packit ea8578
  * Add a json_type_to_name() function.
Packit ea8578
    Eric Haszlakiewicz
Packit ea8578
  * Add a json_tokener_parse_verbose() function.
Packit ea8578
    Jehiah Czebotar
Packit ea8578
  * Improve support for null bytes within JSON strings.
Packit ea8578
    Jehiah Czebotar
Packit ea8578
  * Fix file descriptor leak if memory allocation fails in json_util
Packit ea8578
    Zachary Blair, zack_blair at hotmail dot com
Packit ea8578
  * Add int64 support. Two new functions json_object_net_int64 and
Packit ea8578
    json_object_get_int64. Binary compatibility preserved.
Packit ea8578
    Eric Haszlakiewicz, EHASZLA at transunion com
Packit ea8578
    Rui Miguel Silva Seabra, rms at 1407 dot org
Packit ea8578
  * Fix subtle bug in linkhash where lookup could hang after all slots
Packit ea8578
    were filled then successively freed.
Packit ea8578
    Spotted by Jean-Marc Naud, j dash m at newtraxtech dot com
Packit ea8578
  * Make json_object_from_file take const char *filename
Packit ea8578
    Spotted by Vikram Raj V, vsagar at attinteractive dot com
Packit ea8578
  * Add handling of surrogate pairs (json_tokener.c, test4.c, Makefile.am)
Packit ea8578
    Brent Miller, bdmiller at yahoo dash inc dot com
Packit ea8578
  * Correction to comment describing printbuf_memappend in printbuf.h
Packit ea8578
    Brent Miller, bdmiller at yahoo dash inc dot com
Packit ea8578
Packit ea8578
0.9
Packit ea8578
===
Packit ea8578
  * Add README.html README-WIN32.html config.h.win32 to Makefile.am
Packit ea8578
    Michael Clark, <michael@metaparadigm.com>
Packit ea8578
  * Add const qualifier to the json_tokener_parse functions
Packit ea8578
    Eric Haszlakiewicz, EHASZLA at transunion dot com
Packit ea8578
  * Rename min and max so we can never clash with C or C++ std library
Packit ea8578
    Ian Atha, thatha at yahoo dash inc dot com
Packit ea8578
  * Fix any noticeable spelling or grammar errors.
Packit ea8578
  * Make sure every va_start has a va_end.
Packit ea8578
  * Check all pointers for validity.
Packit ea8578
    Erik Hovland, erik at hovland dot org
Packit ea8578
  * Fix json_object_get_boolean to return false for empty string
Packit ea8578
    Spotted by Vitaly Kruglikov, Vitaly dot Kruglikov at palm dot com
Packit ea8578
  * optimizations to json_tokener_parse_ex(), printbuf_memappend()
Packit ea8578
    Brent Miller, bdmiller at yahoo dash inc dot com
Packit ea8578
  * Disable REFCOUNT_DEBUG by default in json_object.c
Packit ea8578
  * Don't use this as a variable, so we can compile with a C++ compiler
Packit ea8578
  * Add casts from void* to type of assignment when using malloc 
Packit ea8578
  * Add #ifdef __cplusplus guards to all of the headers
Packit ea8578
  * Add typedefs for json_object, json_tokener, array_list, printbuf, lh_table
Packit ea8578
    Michael Clark, <michael@metaparadigm.com>
Packit ea8578
  * Null pointer dereference fix. Fix json_object_get_boolean strlen test
Packit ea8578
    to not return TRUE for zero length string. Remove redundant includes.
Packit ea8578
    Erik Hovland, erik at hovland dot org
Packit ea8578
  * Fixed warning reported by adding -Wstrict-prototypes
Packit ea8578
    -Wold-style-definition to the compilatin flags.
Packit ea8578
    Dotan Barak, dotanba at gmail dot com
Packit ea8578
  * Add const correctness to public interfaces
Packit ea8578
    Gerard Krol, g dot c dot krol at student dot tudelft dot nl
Packit ea8578
Packit ea8578
0.8
Packit ea8578
===
Packit ea8578
  * Add va_end for every va_start
Packit ea8578
    Dotan Barak, dotanba at gmail dot com
Packit ea8578
  * Add macros to enable compiling out debug code
Packit ea8578
    Geoffrey Young, geoff at modperlcookbook dot org
Packit ea8578
  * Fix bug with use of capital E in numbers with exponents
Packit ea8578
    Mateusz Loskot, mateusz at loskot dot net
Packit ea8578
  * Add stddef.h include
Packit ea8578
  * Patch allows for json-c compile with -Werror and not fail due to
Packit ea8578
    -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
Packit ea8578
    Geoffrey Young, geoff at modperlcookbook dot org
Packit ea8578
Packit ea8578
0.7
Packit ea8578
===
Packit ea8578
  * Add escaping of backslash to json output
Packit ea8578
  * Add escaping of foward slash on tokenizing and output
Packit ea8578
  * Changes to internal tokenizer from using recursion to
Packit ea8578
    using a depth state structure to allow incremental parsing
Packit ea8578
Packit ea8578
0.6
Packit ea8578
===
Packit ea8578
  * Fix bug in escaping of control characters
Packit Service c4e42c
    Johan Björklund, johbjo09 at kth dot se
Packit ea8578
  * Remove include "config.h" from headers (should only
Packit ea8578
    be included from .c files)
Packit ea8578
    Michael Clark <michael@metaparadigm.com>
Packit ea8578
Packit ea8578
0.5
Packit ea8578
===
Packit ea8578
  * Make headers C++ compatible by change *this to *obj
Packit ea8578
  * Add ifdef C++ extern "C" to headers
Packit ea8578
  * Use simpler definition of min and max in bits.h
Packit ea8578
    Larry Lansing, llansing at fuzzynerd dot com
Packit ea8578
Packit ea8578
  * Remove automake 1.6 requirement
Packit ea8578
  * Move autogen commands into autogen.sh. Update README
Packit ea8578
  * Remove error pointer special case for Windows
Packit ea8578
  * Change license from LGPL to MIT
Packit ea8578
    Michael Clark <michael@metaparadigm.com>
Packit ea8578
Packit ea8578
0.4
Packit ea8578
===
Packit ea8578
  * Fix additional error case in object parsing
Packit ea8578
  * Add back sign reversal in nested object parse as error pointer
Packit ea8578
    value is negative, while error value is positive.
Packit ea8578
    Michael Clark <michael@metaparadigm.com>
Packit ea8578
Packit ea8578
0.3
Packit ea8578
===
Packit ea8578
  * fix pointer arithmetic bug for error pointer check in is_error() macro
Packit ea8578
  * fix type passed to printbuf_memappend in json_tokener
Packit ea8578
  * update autotools bootstrap instructions in README
Packit ea8578
    Michael Clark <michael@metaparadigm.com>
Packit ea8578
Packit ea8578
0.2
Packit ea8578
===
Packit ea8578
  * printbuf.c - C. Watford (christopher.watford@gmail.com)
Packit ea8578
    Added a Win32/Win64 compliant implementation of vasprintf
Packit ea8578
  * debug.c - C. Watford (christopher.watford@gmail.com)
Packit ea8578
    Removed usage of vsyslog on Win32/Win64 systems, needs to be handled
Packit ea8578
    by a configure script
Packit ea8578
  * json_object.c - C. Watford (christopher.watford@gmail.com)
Packit ea8578
    Added scope operator to wrap usage of json_object_object_foreach, this
Packit ea8578
    needs to be rethought to be more ANSI C friendly
Packit ea8578
  * json_object.h - C. Watford (christopher.watford@gmail.com)
Packit ea8578
    Added Microsoft C friendly version of json_object_object_foreach
Packit ea8578
  * json_tokener.c - C. Watford (christopher.watford@gmail.com)
Packit ea8578
    Added a Win32/Win64 compliant implementation of strndup
Packit ea8578
  * json_util.c - C. Watford (christopher.watford@gmail.com)
Packit ea8578
    Added cast and mask to suffice size_t v. unsigned int conversion
Packit ea8578
    correctness 
Packit ea8578
  * json_tokener.c - sign reversal issue on error info for nested object parse
Packit Service c4e42c
    spotted by Johan Björklund (johbjo09 at kth.se)
Packit ea8578
  * json_object.c - escape " in json_escape_str
Packit ea8578
  * Change to automake and libtool to build shared and static library
Packit ea8578
    Michael Clark <michael@metaparadigm.com>
Packit ea8578
	
Packit ea8578
0.1
Packit ea8578
===
Packit ea8578
  * initial release