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