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