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