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