aboutsummaryrefslogtreecommitdiff
path: root/CHANGES
blob: cf4c7f91d1fa708dd72e02d362def6f5aef385a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
Version 2.6 (in development)
============================

Released XXXX-XX-XX

* New features:

  - `json_pack()` and friends: Add format specifiers ``s%`` and ``+%``
    for a size_t string length.

  - `json_unpack()` and friends: Add format specifier ``s%`` for
    unpacking the string length along with the string itself.

  - Add length-aware string constructors `json_stringn()` and
    `json_stringn_nocheck()`, length-aware string mutators
    `json_string_setn()` and `json_string_setn_nocheck()`, and a
    function for getting string's length `json_string_length()`.

  - Support ``\u0000`` escapes in the decoder.

* Bug fixes:

  - Some malformed ``\uNNNN`` escapes could crash the decoder with an
    assertion failure.

* Other changes:

  - ``\uNNNN`` escapes are now encoded in upper case for better
    readability.


Version 2.5
===========

Released 2013-09-19

* New features:

  - `json_pack()` and friends: Add format specifiers ``s#``, ``+`` and
    ``+#``.

  - Add ``JSON_DECODE_INT_AS_REAL`` decoding flag to treat all numbers
    as real in the decoder (#123).

  - Add `json_array_foreach()`, paralleling `json_object_foreach()`
    (#118).

* Bug fixes:

  - `json_dumps()` and friends: Don't crash if json is *NULL* and
    ``JSON_ENCODE_ANY`` is set.

  - Fix a theoretical integer overflow in `jsonp_strdup()`.

  - Fix `l_isxdigit()` macro (#97).

  - Fix an off-by-one error in `json_array_remove()`.

* Build:

  - Support CMake in addition to GNU Autotools (#106, #107, #112,
    #115, #120, #127).

  - Support building for Android (#109).

  - Don't use ``-Werror`` by default.

  - Support building and testing with VPATH (#93).

  - Fix compilation when ``NDEBUG`` is defined (#128)

* Tests:

  - Fix a refleak in ``test/bin/json_process.c``.

* Documentation:

  - Clarify the return value of `json_load_callback_t`.

  - Document how to circumvent problems with separate heaps on Windows.

  - Fix memory leaks and warnings in ``github_commits.c``.

  - Use `json_decref()` properly in tutorial.

* Other:

  - Make it possible to forward declare ``struct json_t``.


Version 2.4
===========

Released 2012-09-23

* New features:

  - Add `json_boolean()` macro that returns the JSON true or false
    value based on its argument (#86).

  - Add `json_load_callback()` that calls a callback function
    repeatedly to read the JSON input (#57).

  - Add JSON_ESCAPE_SLASH encoding flag to escape all occurences of
    ``/`` with ``\/``.

* Bug fixes:

  - Check for and reject NaN and Inf values for reals. Encoding these
    values resulted in invalid JSON.

  - Fix `json_real_set()` to return -1 on error.

* Build:

  - Jansson now builds on Windows with Visual Studio 2010, and
    includes solution and project files in ``win32/vs2010/``
    directory.

  - Fix build warnings (#77, #78).

  - Add ``-no-undefined`` to LDFLAGS (#90).

* Tests:

  - Fix the symbol exports test on Linux/PPC64 (#88).

* Documentation:

  - Fix typos (#73, #84).


Version 2.3.1
=============

Released 2012-04-20

* Build issues:

  - Only use ``long long`` if ``strtoll()`` is also available.

* Documentation:

  - Fix the names of library version constants in documentation. (#52)

  - Change the tutorial to use GitHub API v3. (#65)

* Tests:

  - Make some tests locale independent. (#51)

  - Distribute the library exports test in the tarball.

  - Make test run on shells that don't support the ``export FOO=bar``
    syntax.


Version 2.3
===========

Released 2012-01-27

* New features:

  - `json_unpack()` and friends: Add support for optional object keys
    with the ``{s?o}`` syntax.

  - Add `json_object_update_existing()` and
    `json_object_update_missing()`, for updating only existing keys or
    only adding missing keys to an object. (#37)

  - Add `json_object_foreach()` for more convenient iteration over
    objects. (#45, #46)

  - When decoding JSON, write the number of bytes that were read from
    input to ``error.position`` also on success. This is handy with
    ``JSON_DISABLE_EOF_CHECK``.

  - Add support for decoding any JSON value, not just arrays or
    objects. The support is enabled with the new ``JSON_DECODE_ANY``
    flag. Patch by Andrea Marchesini. (#4)

* Bug fixes

  - Avoid problems with object's serial number growing too big. (#40,
    #41)

  - Decoding functions now return NULL if the first argument is NULL.
    Patch by Andrea Marchesini.

  - Include ``jansson_config.h.win32`` in the distribution tarball.

  - Remove ``+`` and leading zeros from exponents in the encoder.
    (#39)

  - Make Jansson build and work on MinGW. (#39, #38)

* Documentation

  - Note that the same JSON values must not be encoded in parallel by
    separate threads. (#42)

  - Document MinGW support.


Version 2.2.1
=============

Released 2011-10-06

* Bug fixes:

  - Fix real number encoding and decoding under non-C locales. (#32)

  - Fix identifier decoding under non-UTF-8 locales. (#35)

  - `json_load_file()`: Open the input file in binary mode for maximum
    compatiblity.

* Documentation:

  - Clarify the lifecycle of the result of the ``s`` fromat of
    `json_unpack()`. (#31)

  - Add some portability info. (#36)

  - Little clarifications here and there.

* Other:

  - Some style fixes, issues detected by static analyzers.


Version 2.2
===========

Released 2011-09-03

* New features:

  - `json_dump_callback()`: Pass the encoder output to a callback
    function in chunks.

* Bug fixes:

  - `json_string_set()`: Check that target is a string and value is
    not NULL.

* Other:

  - Documentation typo fixes and clarifications.


Version 2.1
===========

Released 2011-06-10

* New features:

  - `json_loadb()`: Decode a string with a given size, useful if the
    string is not null terminated.

  - Add ``JSON_ENCODE_ANY`` encoding flag to allow encoding any JSON
    value. By default, only arrays and objects can be encoded. (#19)

  - Add ``JSON_REJECT_DUPLICATES`` decoding flag to issue a decoding
    error if any JSON object in the input contins duplicate keys. (#3)

  - Add ``JSON_DISABLE_EOF_CHECK`` decoding flag to stop decoding after a
    valid JSON input. This allows other data after the JSON data.

* Bug fixes:

  - Fix an additional memory leak when memory allocation fails in
    `json_object_set()` and friends.

  - Clear errno before calling `strtod()` for better portability. (#27)

* Building:

  - Avoid set-but-not-used warning/error in a test. (#20)

* Other:

  - Minor clarifications to documentation.


Version 2.0.1
=============

Released 2011-03-31

* Bug fixes:

  - Replace a few `malloc()` and `free()` calls with their
    counterparts that support custom memory management.

  - Fix object key hashing in json_unpack() strict checking mode.

  - Fix the parentheses in ``JANSSON_VERSION_HEX`` macro.

  - Fix `json_object_size()` return value.

  - Fix a few compilation issues.

* Portability:

  - Enhance portability of `va_copy()`.

  - Test framework portability enhancements.

* Documentation:

  - Distribute ``doc/upgrading.rst`` with the source tarball.

  - Build documentation in strict mode in ``make distcheck``.


Version 2.0
===========

Released 2011-02-28

This release is backwards incompatible with the 1.x release series.
See the chapter "Upgrading from older versions" in documentation for
details.

* Backwards incompatible changes:

  - Unify unsigned integer usage in the API: All occurences of
    unsigned int and unsigned long have been replaced with size_t.

  - Change JSON integer's underlying type to the widest signed integer
    type available, i.e. long long if it's supported, otherwise long.
    Add a typedef json_int_t that defines the type.

  - Change the maximum indentation depth to 31 spaces in encoder. This
    frees up bits from the flags parameter of encoding functions
    `json_dumpf()`, `json_dumps()` and `json_dump_file()`.

  - For future needs, add a flags parameter to all decoding functions
    `json_loadf()`, `json_loads()` and `json_load_file()`.

* New features

  - `json_pack()`, `json_pack_ex()`, `json_vpack_ex()`: Create JSON
    values based on a format string.

  - `json_unpack()`, `json_unpack_ex()`, `json_vunpack_ex()`: Simple
    value extraction and validation functionality based on a format
    string.

  - Add column, position and source fields to the ``json_error_t``
    struct.

  - Enhance error reporting in the decoder.

  - ``JANSSON_VERSION`` et al.: Preprocessor constants that define the
    library version.

  - `json_set_alloc_funcs()`: Set custom memory allocation functions.

* Fix many portability issues, especially on Windows.

* Configuration

  - Add file ``jansson_config.h`` that contains site specific
    configuration. It's created automatically by the configure script,
    or can be created by hand if the configure script cannot be used.
    The file ``jansson_config.h.win32`` can be used without
    modifications on Windows systems.

  - Add a section to documentation describing how to build Jansson on
    Windows.

  - Documentation now requires Sphinx 1.0 or newer.


Version 1.3
===========

Released 2010-06-13

* New functions:

  - `json_object_iter_set()`, `json_object_iter_set_new()`: Change
    object contents while iterating over it.

  - `json_object_iter_at()`: Return an iterator that points to a
    specific object item.

* New encoding flags:

  - ``JSON_PRESERVE_ORDER``: Preserve the insertion order of object
    keys.

* Bug fixes:

  - Fix an error that occured when an array or object was first
    encoded as empty, then populated with some data, and then
    re-encoded

  - Fix the situation like above, but when the first encoding resulted
    in an error

* Documentation:

  - Clarify the documentation on reference stealing, providing an
    example usage pattern


Version 1.2.1
=============

Released 2010-04-03

* Bug fixes:

  - Fix reference counting on ``true``, ``false`` and ``null``
  - Estimate real number underflows in decoder with 0.0 instead of
    issuing an error

* Portability:

  - Make ``int32_t`` available on all systems
  - Support compilers that don't have the ``inline`` keyword
  - Require Autoconf 2.60 (for ``int32_t``)

* Tests:

  - Print test names correctly when ``VERBOSE=1``
  - ``test/suites/api``: Fail when a test fails
  - Enhance tests for iterators
  - Enhance tests for decoding texts that contain null bytes

* Documentation:

  - Don't remove ``changes.rst`` in ``make clean``
  - Add a chapter on RFC conformance


Version 1.2
===========

Released 2010-01-21

* New functions:

  - `json_equal()`: Test whether two JSON values are equal
  - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
    of JSON values
  - Add a version of all functions taking a string argument that
    doesn't check for valid UTF-8: `json_string_nocheck()`,
    `json_string_set_nocheck()`, `json_object_set_nocheck()`,
    `json_object_set_new_nocheck()`

* New encoding flags:

  - ``JSON_SORT_KEYS``: Sort objects by key
  - ``JSON_ENSURE_ASCII``: Escape all non-ASCII Unicode characters
  - ``JSON_COMPACT``: Use a compact representation with all unneeded
    whitespace stripped

* Bug fixes:

  - Revise and unify whitespace usage in encoder: Add spaces between
    array and object items, never append newline to output.
  - Remove const qualifier from the ``json_t`` parameter in
    `json_string_set()`, `json_integer_set()` and `json_real_set`.
  - Use ``int32_t`` internally for representing Unicode code points
    (int is not enough on all platforms)

* Other changes:

  - Convert ``CHANGES`` (this file) to reStructured text and add it to
    HTML documentation
  - The test system has been refactored. Python is no longer required
    to run the tests.
  - Documentation can now be built by invoking ``make html``
  - Support for pkg-config


Version 1.1.3
=============

Released 2009-12-18

* Encode reals correctly, so that first encoding and then decoding a
  real always produces the same value
* Don't export private symbols in ``libjansson.so``


Version 1.1.2
=============

Released 2009-11-08

* Fix a bug where an error message was not produced if the input file
  could not be opened in `json_load_file()`
* Fix an assertion failure in decoder caused by a minus sign without a
  digit after it
* Remove an unneeded include of ``stdint.h`` in ``jansson.h``


Version 1.1.1
=============

Released 2009-10-26

* All documentation files were not distributed with v1.1; build
  documentation in make distcheck to prevent this in the future
* Fix v1.1 release date in ``CHANGES``


Version 1.1
===========

Released 2009-10-20

* API additions and improvements:

  - Extend array and object APIs
  - Add functions to modify integer, real and string values
  - Improve argument validation
  - Use unsigned int instead of ``uint32_t`` for encoding flags

* Enhance documentation

  - Add getting started guide and tutorial
  - Fix some typos
  - General clarifications and cleanup

* Check for integer and real overflows and underflows in decoder
* Make singleton values thread-safe (``true``, ``false`` and ``null``)
* Enhance circular reference handling
* Don't define ``-std=c99`` in ``AM_CFLAGS``
* Add C++ guards to ``jansson.h``
* Minor performance and portability improvements
* Expand test coverage


Version 1.0.4
=============

Released 2009-10-11

* Relax Autoconf version requirement to 2.59
* Make Jansson compile on platforms where plain ``char`` is unsigned
* Fix API tests for object


Version 1.0.3
=============

Released 2009-09-14

* Check for integer and real overflows and underflows in decoder
* Use the Python json module for tests, or simplejson if the json
  module is not found
* Distribute changelog (this file)


Version 1.0.2
=============

Released 2009-09-08

* Handle EOF correctly in decoder


Version 1.0.1
=============

Released 2009-09-04

* Fixed broken `json_is_boolean()`


Version 1.0
===========

Released 2009-08-25

* Initial release