update spec version
[jansson.git] / CHANGES
1 Version 2.4
2 ===========
3
4 Released 2012-09-23
5
6 * New features:
7
8   - Add `json_boolean()` macro that returns the JSON true or false
9     value based on its argument (#86).
10
11   - Add `json_load_callback()` that calls a callback function
12     repeatedly to read the JSON input (#57).
13
14   - Add JSON_ESCAPE_SLASH encoding flag to escape all occurences of
15     ``/`` with ``\/``.
16
17 * Bug fixes:
18
19   - Check for and reject NaN and Inf values for reals. Encoding these
20     values resulted in invalid JSON.
21
22   - Fix `json_real_set()` to return -1 on error.
23
24 * Build:
25
26   - Jansson now builds on Windows with Visual Studio 2010, and
27     includes solution and project files in ``win32/vs2010/``
28     directory.
29
30   - Fix build warnings (#77, #78).
31
32   - Add ``-no-undefined`` to LDFLAGS (#90).
33
34 * Tests:
35
36   - Fix the symbol exports test on Linux/PPC64 (#88).
37
38 * Documentation:
39
40   - Fix typos (#73, #84).
41
42
43 Version 2.3.1
44 =============
45
46 Released 2012-04-20
47
48 * Build issues:
49
50   - Only use ``long long`` if ``strtoll()`` is also available.
51
52 * Documentation:
53
54   - Fix the names of library version constants in documentation. (#52)
55
56   - Change the tutorial to use GitHub API v3. (#65)
57
58 * Tests:
59
60   - Make some tests locale independent. (#51)
61
62   - Distribute the library exports test in the tarball.
63
64   - Make test run on shells that don't support the ``export FOO=bar``
65     syntax.
66
67
68 Version 2.3
69 ===========
70
71 Released 2012-01-27
72
73 * New features:
74
75   - `json_unpack()` and friends: Add support for optional object keys
76     with the ``{s?o}`` syntax.
77
78   - Add `json_object_update_existing()` and
79     `json_object_update_missing()`, for updating only existing keys or
80     only adding missing keys to an object. (#37)
81
82   - Add `json_object_foreach()` for more convenient iteration over
83     objects. (#45, #46)
84
85   - When decoding JSON, write the number of bytes that were read from
86     input to ``error.position`` also on success. This is handy with
87     ``JSON_DISABLE_EOF_CHECK``.
88
89   - Add support for decoding any JSON value, not just arrays or
90     objects. The support is enabled with the new ``JSON_DECODE_ANY``
91     flag. Patch by Andrea Marchesini. (#4)
92
93 * Bug fixes
94
95   - Avoid problems with object's serial number growing too big. (#40,
96     #41)
97
98   - Decoding functions now return NULL if the first argument is NULL.
99     Patch by Andrea Marchesini.
100
101   - Include ``jansson_config.h.win32`` in the distribution tarball.
102
103   - Remove ``+`` and leading zeros from exponents in the encoder.
104     (#39)
105
106   - Make Jansson build and work on MinGW. (#39, #38)
107
108 * Documentation
109
110   - Note that the same JSON values must not be encoded in parallel by
111     separate threads. (#42)
112
113   - Document MinGW support.
114
115
116 Version 2.2.1
117 =============
118
119 Released 2011-10-06
120
121 * Bug fixes:
122
123   - Fix real number encoding and decoding under non-C locales. (#32)
124
125   - Fix identifier decoding under non-UTF-8 locales. (#35)
126
127   - `json_load_file()`: Open the input file in binary mode for maximum
128     compatiblity.
129
130 * Documentation:
131
132   - Clarify the lifecycle of the result of the ``s`` fromat of
133     `json_unpack()`. (#31)
134
135   - Add some portability info. (#36)
136
137   - Little clarifications here and there.
138
139 * Other:
140
141   - Some style fixes, issues detected by static analyzers.
142
143
144 Version 2.2
145 ===========
146
147 Released 2011-09-03
148
149 * New features:
150
151   - `json_dump_callback()`: Pass the encoder output to a callback
152     function in chunks.
153
154 * Bug fixes:
155
156   - `json_string_set()`: Check that target is a string and value is
157     not NULL.
158
159 * Other:
160
161   - Documentation typo fixes and clarifications.
162
163
164 Version 2.1
165 ===========
166
167 Released 2011-06-10
168
169 * New features:
170
171   - `json_loadb()`: Decode a string with a given size, useful if the
172     string is not null terminated.
173
174   - Add ``JSON_ENCODE_ANY`` encoding flag to allow encoding any JSON
175     value. By default, only arrays and objects can be encoded. (#19)
176
177   - Add ``JSON_REJECT_DUPLICATES`` decoding flag to issue a decoding
178     error if any JSON object in the input contins duplicate keys. (#3)
179
180   - Add ``JSON_DISABLE_EOF_CHECK`` decoding flag to stop decoding after a
181     valid JSON input. This allows other data after the JSON data.
182
183 * Bug fixes:
184
185   - Fix an additional memory leak when memory allocation fails in
186     `json_object_set()` and friends.
187
188   - Clear errno before calling `strtod()` for better portability. (#27)
189
190 * Building:
191
192   - Avoid set-but-not-used warning/error in a test. (#20)
193
194 * Other:
195
196   - Minor clarifications to documentation.
197
198
199 Version 2.0.1
200 =============
201
202 Released 2011-03-31
203
204 * Bug fixes:
205
206   - Replace a few `malloc()` and `free()` calls with their
207     counterparts that support custom memory management.
208
209   - Fix object key hashing in json_unpack() strict checking mode.
210
211   - Fix the parentheses in ``JANSSON_VERSION_HEX`` macro.
212
213   - Fix `json_object_size()` return value.
214
215   - Fix a few compilation issues.
216
217 * Portability:
218
219   - Enhance portability of `va_copy()`.
220
221   - Test framework portability enhancements.
222
223 * Documentation:
224
225   - Distribute ``doc/upgrading.rst`` with the source tarball.
226
227   - Build documentation in strict mode in ``make distcheck``.
228
229
230 Version 2.0
231 ===========
232
233 Released 2011-02-28
234
235 This release is backwards incompatible with the 1.x release series.
236 See the chapter "Upgrading from older versions" in documentation for
237 details.
238
239 * Backwards incompatible changes:
240
241   - Unify unsigned integer usage in the API: All occurences of
242     unsigned int and unsigned long have been replaced with size_t.
243
244   - Change JSON integer's underlying type to the widest signed integer
245     type available, i.e. long long if it's supported, otherwise long.
246     Add a typedef json_int_t that defines the type.
247
248   - Change the maximum indentation depth to 31 spaces in encoder. This
249     frees up bits from the flags parameter of encoding functions
250     `json_dumpf()`, `json_dumps()` and `json_dump_file()`.
251
252   - For future needs, add a flags parameter to all decoding functions
253     `json_loadf()`, `json_loads()` and `json_load_file()`.
254
255 * New features
256
257   - `json_pack()`, `json_pack_ex()`, `json_vpack_ex()`: Create JSON
258     values based on a format string.
259
260   - `json_unpack()`, `json_unpack_ex()`, `json_vunpack_ex()`: Simple
261     value extraction and validation functionality based on a format
262     string.
263
264   - Add column, position and source fields to the ``json_error_t``
265     struct.
266
267   - Enhance error reporting in the decoder.
268
269   - ``JANSSON_VERSION`` et al.: Preprocessor constants that define the
270     library version.
271
272   - `json_set_alloc_funcs()`: Set custom memory allocation functions.
273
274 * Fix many portability issues, especially on Windows.
275
276 * Configuration
277
278   - Add file ``jansson_config.h`` that contains site specific
279     configuration. It's created automatically by the configure script,
280     or can be created by hand if the configure script cannot be used.
281     The file ``jansson_config.h.win32`` can be used without
282     modifications on Windows systems.
283
284   - Add a section to documentation describing how to build Jansson on
285     Windows.
286
287   - Documentation now requires Sphinx 1.0 or newer.
288
289
290 Version 1.3
291 ===========
292
293 Released 2010-06-13
294
295 * New functions:
296
297   - `json_object_iter_set()`, `json_object_iter_set_new()`: Change
298     object contents while iterating over it.
299
300   - `json_object_iter_at()`: Return an iterator that points to a
301     specific object item.
302
303 * New encoding flags:
304
305   - ``JSON_PRESERVE_ORDER``: Preserve the insertion order of object
306     keys.
307
308 * Bug fixes:
309
310   - Fix an error that occured when an array or object was first
311     encoded as empty, then populated with some data, and then
312     re-encoded
313
314   - Fix the situation like above, but when the first encoding resulted
315     in an error
316
317 * Documentation:
318
319   - Clarify the documentation on reference stealing, providing an
320     example usage pattern
321
322
323 Version 1.2.1
324 =============
325
326 Released 2010-04-03
327
328 * Bug fixes:
329
330   - Fix reference counting on ``true``, ``false`` and ``null``
331   - Estimate real number underflows in decoder with 0.0 instead of
332     issuing an error
333
334 * Portability:
335
336   - Make ``int32_t`` available on all systems
337   - Support compilers that don't have the ``inline`` keyword
338   - Require Autoconf 2.60 (for ``int32_t``)
339
340 * Tests:
341
342   - Print test names correctly when ``VERBOSE=1``
343   - ``test/suites/api``: Fail when a test fails
344   - Enhance tests for iterators
345   - Enhance tests for decoding texts that contain null bytes
346
347 * Documentation:
348
349   - Don't remove ``changes.rst`` in ``make clean``
350   - Add a chapter on RFC conformance
351
352
353 Version 1.2
354 ===========
355
356 Released 2010-01-21
357
358 * New functions:
359
360   - `json_equal()`: Test whether two JSON values are equal
361   - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
362     of JSON values
363   - Add a version of all functions taking a string argument that
364     doesn't check for valid UTF-8: `json_string_nocheck()`,
365     `json_string_set_nocheck()`, `json_object_set_nocheck()`,
366     `json_object_set_new_nocheck()`
367
368 * New encoding flags:
369
370   - ``JSON_SORT_KEYS``: Sort objects by key
371   - ``JSON_ENSURE_ASCII``: Escape all non-ASCII Unicode characters
372   - ``JSON_COMPACT``: Use a compact representation with all unneeded
373     whitespace stripped
374
375 * Bug fixes:
376
377   - Revise and unify whitespace usage in encoder: Add spaces between
378     array and object items, never append newline to output.
379   - Remove const qualifier from the ``json_t`` parameter in
380     `json_string_set()`, `json_integer_set()` and `json_real_set`.
381   - Use ``int32_t`` internally for representing Unicode code points
382     (int is not enough on all platforms)
383
384 * Other changes:
385
386   - Convert ``CHANGES`` (this file) to reStructured text and add it to
387     HTML documentation
388   - The test system has been refactored. Python is no longer required
389     to run the tests.
390   - Documentation can now be built by invoking ``make html``
391   - Support for pkg-config
392
393
394 Version 1.1.3
395 =============
396
397 Released 2009-12-18
398
399 * Encode reals correctly, so that first encoding and then decoding a
400   real always produces the same value
401 * Don't export private symbols in ``libjansson.so``
402
403
404 Version 1.1.2
405 =============
406
407 Released 2009-11-08
408
409 * Fix a bug where an error message was not produced if the input file
410   could not be opened in `json_load_file()`
411 * Fix an assertion failure in decoder caused by a minus sign without a
412   digit after it
413 * Remove an unneeded include of ``stdint.h`` in ``jansson.h``
414
415
416 Version 1.1.1
417 =============
418
419 Released 2009-10-26
420
421 * All documentation files were not distributed with v1.1; build
422   documentation in make distcheck to prevent this in the future
423 * Fix v1.1 release date in ``CHANGES``
424
425
426 Version 1.1
427 ===========
428
429 Released 2009-10-20
430
431 * API additions and improvements:
432
433   - Extend array and object APIs
434   - Add functions to modify integer, real and string values
435   - Improve argument validation
436   - Use unsigned int instead of ``uint32_t`` for encoding flags
437
438 * Enhance documentation
439
440   - Add getting started guide and tutorial
441   - Fix some typos
442   - General clarifications and cleanup
443
444 * Check for integer and real overflows and underflows in decoder
445 * Make singleton values thread-safe (``true``, ``false`` and ``null``)
446 * Enhance circular reference handling
447 * Don't define ``-std=c99`` in ``AM_CFLAGS``
448 * Add C++ guards to ``jansson.h``
449 * Minor performance and portability improvements
450 * Expand test coverage
451
452
453 Version 1.0.4
454 =============
455
456 Released 2009-10-11
457
458 * Relax Autoconf version requirement to 2.59
459 * Make Jansson compile on platforms where plain ``char`` is unsigned
460 * Fix API tests for object
461
462
463 Version 1.0.3
464 =============
465
466 Released 2009-09-14
467
468 * Check for integer and real overflows and underflows in decoder
469 * Use the Python json module for tests, or simplejson if the json
470   module is not found
471 * Distribute changelog (this file)
472
473
474 Version 1.0.2
475 =============
476
477 Released 2009-09-08
478
479 * Handle EOF correctly in decoder
480
481
482 Version 1.0.1
483 =============
484
485 Released 2009-09-04
486
487 * Fixed broken `json_is_boolean()`
488
489
490 Version 1.0
491 ===========
492
493 Released 2009-08-25
494
495 * Initial release