1 Version 2.4 (in development)
2 ============================
8 - Add `json_boolean()` macro that returns the JSON true or false
9 value based on its argument (#86).
11 - Add `json_load_callback()` that calls a callback function
12 repeatedly to read the JSON input (#57).
14 - Add JSON_ESCAPE_SLASH encoding flag to escape all occurences of
19 - Jansson now builds on Windows with Visual Studio 2010, and
20 includes solution and project files in ``win32/vs2010/``
23 - Fix build warnings (#77, #78).
27 - Fix typos (#73, #84).
37 - Only use ``long long`` if ``strtoll()`` is also available.
41 - Fix the names of library version constants in documentation. (#52)
43 - Change the tutorial to use GitHub API v3. (#65)
47 - Make some tests locale independent. (#51)
49 - Distribute the library exports test in the tarball.
51 - Make test run on shells that don't support the ``export FOO=bar``
62 - `json_unpack()` and friends: Add support for optional object keys
63 with the ``{s?o}`` syntax.
65 - Add `json_object_update_existing()` and
66 `json_object_update_missing()`, for updating only existing keys or
67 only adding missing keys to an object. (#37)
69 - Add `json_object_foreach()` for more convenient iteration over
72 - When decoding JSON, write the number of bytes that were read from
73 input to ``error.position`` also on success. This is handy with
74 ``JSON_DISABLE_EOF_CHECK``.
76 - Add support for decoding any JSON value, not just arrays or
77 objects. The support is enabled with the new ``JSON_DECODE_ANY``
78 flag. Patch by Andrea Marchesini. (#4)
82 - Avoid problems with object's serial number growing too big. (#40,
85 - Decoding functions now return NULL if the first argument is NULL.
86 Patch by Andrea Marchesini.
88 - Include ``jansson_config.h.win32`` in the distribution tarball.
90 - Remove ``+`` and leading zeros from exponents in the encoder.
93 - Make Jansson build and work on MinGW. (#39, #38)
97 - Note that the same JSON values must not be encoded in parallel by
98 separate threads. (#42)
100 - Document MinGW support.
110 - Fix real number encoding and decoding under non-C locales. (#32)
112 - Fix identifier decoding under non-UTF-8 locales. (#35)
114 - `json_load_file()`: Open the input file in binary mode for maximum
119 - Clarify the lifecycle of the result of the ``s`` fromat of
120 `json_unpack()`. (#31)
122 - Add some portability info. (#36)
124 - Little clarifications here and there.
128 - Some style fixes, issues detected by static analyzers.
138 - `json_dump_callback()`: Pass the encoder output to a callback
143 - `json_string_set()`: Check that target is a string and value is
148 - Documentation typo fixes and clarifications.
158 - `json_loadb()`: Decode a string with a given size, useful if the
159 string is not null terminated.
161 - Add ``JSON_ENCODE_ANY`` encoding flag to allow encoding any JSON
162 value. By default, only arrays and objects can be encoded. (#19)
164 - Add ``JSON_REJECT_DUPLICATES`` decoding flag to issue a decoding
165 error if any JSON object in the input contins duplicate keys. (#3)
167 - Add ``JSON_DISABLE_EOF_CHECK`` decoding flag to stop decoding after a
168 valid JSON input. This allows other data after the JSON data.
172 - Fix an additional memory leak when memory allocation fails in
173 `json_object_set()` and friends.
175 - Clear errno before calling `strtod()` for better portability. (#27)
179 - Avoid set-but-not-used warning/error in a test. (#20)
183 - Minor clarifications to documentation.
193 - Replace a few `malloc()` and `free()` calls with their
194 counterparts that support custom memory management.
196 - Fix object key hashing in json_unpack() strict checking mode.
198 - Fix the parentheses in ``JANSSON_VERSION_HEX`` macro.
200 - Fix `json_object_size()` return value.
202 - Fix a few compilation issues.
206 - Enhance portability of `va_copy()`.
208 - Test framework portability enhancements.
212 - Distribute ``doc/upgrading.rst`` with the source tarball.
214 - Build documentation in strict mode in ``make distcheck``.
222 This release is backwards incompatible with the 1.x release series.
223 See the chapter "Upgrading from older versions" in documentation for
226 * Backwards incompatible changes:
228 - Unify unsigned integer usage in the API: All occurences of
229 unsigned int and unsigned long have been replaced with size_t.
231 - Change JSON integer's underlying type to the widest signed integer
232 type available, i.e. long long if it's supported, otherwise long.
233 Add a typedef json_int_t that defines the type.
235 - Change the maximum indentation depth to 31 spaces in encoder. This
236 frees up bits from the flags parameter of encoding functions
237 `json_dumpf()`, `json_dumps()` and `json_dump_file()`.
239 - For future needs, add a flags parameter to all decoding functions
240 `json_loadf()`, `json_loads()` and `json_load_file()`.
244 - `json_pack()`, `json_pack_ex()`, `json_vpack_ex()`: Create JSON
245 values based on a format string.
247 - `json_unpack()`, `json_unpack_ex()`, `json_vunpack_ex()`: Simple
248 value extraction and validation functionality based on a format
251 - Add column, position and source fields to the ``json_error_t``
254 - Enhance error reporting in the decoder.
256 - ``JANSSON_VERSION`` et al.: Preprocessor constants that define the
259 - `json_set_alloc_funcs()`: Set custom memory allocation functions.
261 * Fix many portability issues, especially on Windows.
265 - Add file ``jansson_config.h`` that contains site specific
266 configuration. It's created automatically by the configure script,
267 or can be created by hand if the configure script cannot be used.
268 The file ``jansson_config.h.win32`` can be used without
269 modifications on Windows systems.
271 - Add a section to documentation describing how to build Jansson on
274 - Documentation now requires Sphinx 1.0 or newer.
284 - `json_object_iter_set()`, `json_object_iter_set_new()`: Change
285 object contents while iterating over it.
287 - `json_object_iter_at()`: Return an iterator that points to a
288 specific object item.
290 * New encoding flags:
292 - ``JSON_PRESERVE_ORDER``: Preserve the insertion order of object
297 - Fix an error that occured when an array or object was first
298 encoded as empty, then populated with some data, and then
301 - Fix the situation like above, but when the first encoding resulted
306 - Clarify the documentation on reference stealing, providing an
307 example usage pattern
317 - Fix reference counting on ``true``, ``false`` and ``null``
318 - Estimate real number underflows in decoder with 0.0 instead of
323 - Make ``int32_t`` available on all systems
324 - Support compilers that don't have the ``inline`` keyword
325 - Require Autoconf 2.60 (for ``int32_t``)
329 - Print test names correctly when ``VERBOSE=1``
330 - ``test/suites/api``: Fail when a test fails
331 - Enhance tests for iterators
332 - Enhance tests for decoding texts that contain null bytes
336 - Don't remove ``changes.rst`` in ``make clean``
337 - Add a chapter on RFC conformance
347 - `json_equal()`: Test whether two JSON values are equal
348 - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
350 - Add a version of all functions taking a string argument that
351 doesn't check for valid UTF-8: `json_string_nocheck()`,
352 `json_string_set_nocheck()`, `json_object_set_nocheck()`,
353 `json_object_set_new_nocheck()`
355 * New encoding flags:
357 - ``JSON_SORT_KEYS``: Sort objects by key
358 - ``JSON_ENSURE_ASCII``: Escape all non-ASCII Unicode characters
359 - ``JSON_COMPACT``: Use a compact representation with all unneeded
364 - Revise and unify whitespace usage in encoder: Add spaces between
365 array and object items, never append newline to output.
366 - Remove const qualifier from the ``json_t`` parameter in
367 `json_string_set()`, `json_integer_set()` and `json_real_set`.
368 - Use ``int32_t`` internally for representing Unicode code points
369 (int is not enough on all platforms)
373 - Convert ``CHANGES`` (this file) to reStructured text and add it to
375 - The test system has been refactored. Python is no longer required
377 - Documentation can now be built by invoking ``make html``
378 - Support for pkg-config
386 * Encode reals correctly, so that first encoding and then decoding a
387 real always produces the same value
388 * Don't export private symbols in ``libjansson.so``
396 * Fix a bug where an error message was not produced if the input file
397 could not be opened in `json_load_file()`
398 * Fix an assertion failure in decoder caused by a minus sign without a
400 * Remove an unneeded include of ``stdint.h`` in ``jansson.h``
408 * All documentation files were not distributed with v1.1; build
409 documentation in make distcheck to prevent this in the future
410 * Fix v1.1 release date in ``CHANGES``
418 * API additions and improvements:
420 - Extend array and object APIs
421 - Add functions to modify integer, real and string values
422 - Improve argument validation
423 - Use unsigned int instead of ``uint32_t`` for encoding flags
425 * Enhance documentation
427 - Add getting started guide and tutorial
429 - General clarifications and cleanup
431 * Check for integer and real overflows and underflows in decoder
432 * Make singleton values thread-safe (``true``, ``false`` and ``null``)
433 * Enhance circular reference handling
434 * Don't define ``-std=c99`` in ``AM_CFLAGS``
435 * Add C++ guards to ``jansson.h``
436 * Minor performance and portability improvements
437 * Expand test coverage
445 * Relax Autoconf version requirement to 2.59
446 * Make Jansson compile on platforms where plain ``char`` is unsigned
447 * Fix API tests for object
455 * Check for integer and real overflows and underflows in decoder
456 * Use the Python json module for tests, or simplejson if the json
458 * Distribute changelog (this file)
466 * Handle EOF correctly in decoder
474 * Fixed broken `json_is_boolean()`