xref: /trueos/contrib/jansson/CHANGES (revision 47b2a07a74bf982bec730c936e92feeef05c7575)
1Version 2.7
2===========
3
4Released 2014-10-02
5
6* New features:
7
8  - `json_pack()` and friends: Add format specifiers ``s%`` and ``+%``
9    for a size_t string length (#141).
10
11  - `json_unpack()` and friends: Add format specifier ``s%`` for
12    unpacking the string length along with the string itself (#141).
13
14  - Add length-aware string constructors `json_stringn()` and
15    `json_stringn_nocheck()`, length-aware string mutators
16    `json_string_setn()` and `json_string_setn_nocheck()`, and a
17    function for getting string's length `json_string_length()` (#141,
18    #143).
19
20  - Support ``\u0000`` escapes in the decoder. The support can be
21    enabled by using the ``JSON_ALLOW_NUL`` decoding flag (#141).
22
23  - Add `json_boolean_value()` as an alias for `json_is_true()`
24    (#146).
25
26  - Add JSON_REAL_PRECISION encoding flag/macro for controlling real
27    number precision (#178).
28
29  - Define the maximum indentation as JSON_MAX_INDENT (#191).
30
31* Bug fixes:
32
33  - Some malformed ``\uNNNN`` escapes could crash the decoder with an
34    assertion failure.
35
36  - Avoid integer overflows with very long strings in UTF-8 decoder and
37    hashtable.
38
39  - Check for *NULL* key in `json_object_get()` and
40    `json_object_del()` (#151).
41
42  - Enhance hashtable seeding on Windows (#162).
43
44  - `json_unpack()`: Allow mixing JSON_STRICT with optional keys
45    (#162, #163).
46
47  - Fix int/int32 mismatch (#142).
48
49  - Parse subnormal numbers correctly (#202).
50
51* Build:
52
53  - Remove VS2010 build files. CMake should be used on Windows instead
54    (#165).
55
56  - Fix CMake build flags for MinGW (#193).
57
58  - Add CMake config files for find_package. Rename config.h to
59    jansson_private_config.h (#157, #159).
60
61  - Make Valgrind checks work with CMake (#160).
62
63  - Fix feature checks to use correct __ATOMIC flags.
64
65  - Fix CMake checks for uint16_t and uint8_t support (#177).
66
67  - Make Jansson build on SmartOS/Solaris (#171).
68
69  - Work around a GCC bug on Solaris (#175).
70
71  - Fix autoreconf on Debian (#182).
72
73  - Don't use GNU make specific export for global AM_CFLAGS (#203,
74    #204).
75
76  - Fix building on Android using the supplied Android.mk (#166,
77    #174).
78
79  - Android.mk: Add -DHAVE_STDINT_H to LOCAL_CFLAGS (#200).
80
81* Documentation:
82
83  - Document JANSSON_BUILD_SHARED_LIBS CMake option (#187).
84
85* Tests:
86
87  - Close file handles correctly (#198).
88
89* Other changes:
90
91  - ``\uNNNN`` escapes are now encoded in upper case for better
92    readability.
93
94  - Enable usage of AddressSanitizer (#180).
95
96
97Version 2.6
98===========
99
100Released 2014-02-11
101
102* Security:
103
104  - CVE-2013-6401: The hash function used by the hashtable
105    implementation has been changed, and is automatically seeded with
106    random data when the first JSON object is created. This prevents
107    an attacker from causing large JSON objects with specially crafted
108    keys perform poorly.
109
110* New features:
111
112  - `json_object_seed()`: Set the seed value of the hash function.
113
114* Bug fixes:
115
116  - Include CMake specific files in the release tarball.
117
118* Documentation:
119
120  - Fix tutorial source to send a User-Agent header, which is now
121    required by the GitHub API.
122
123  - Set all memory to zero in secure_free() example.
124
125
126Version 2.5
127===========
128
129Released 2013-09-19
130
131* New features:
132
133  - `json_pack()` and friends: Add format specifiers ``s#``, ``+`` and
134    ``+#``.
135
136  - Add ``JSON_DECODE_INT_AS_REAL`` decoding flag to treat all numbers
137    as real in the decoder (#123).
138
139  - Add `json_array_foreach()`, paralleling `json_object_foreach()`
140    (#118).
141
142* Bug fixes:
143
144  - `json_dumps()` and friends: Don't crash if json is *NULL* and
145    ``JSON_ENCODE_ANY`` is set.
146
147  - Fix a theoretical integer overflow in `jsonp_strdup()`.
148
149  - Fix `l_isxdigit()` macro (#97).
150
151  - Fix an off-by-one error in `json_array_remove()`.
152
153* Build:
154
155  - Support CMake in addition to GNU Autotools (#106, #107, #112,
156    #115, #120, #127).
157
158  - Support building for Android (#109).
159
160  - Don't use ``-Werror`` by default.
161
162  - Support building and testing with VPATH (#93).
163
164  - Fix compilation when ``NDEBUG`` is defined (#128)
165
166* Tests:
167
168  - Fix a refleak in ``test/bin/json_process.c``.
169
170* Documentation:
171
172  - Clarify the return value of `json_load_callback_t`.
173
174  - Document how to circumvent problems with separate heaps on Windows.
175
176  - Fix memory leaks and warnings in ``github_commits.c``.
177
178  - Use `json_decref()` properly in tutorial.
179
180* Other:
181
182  - Make it possible to forward declare ``struct json_t``.
183
184
185Version 2.4
186===========
187
188Released 2012-09-23
189
190* New features:
191
192  - Add `json_boolean()` macro that returns the JSON true or false
193    value based on its argument (#86).
194
195  - Add `json_load_callback()` that calls a callback function
196    repeatedly to read the JSON input (#57).
197
198  - Add JSON_ESCAPE_SLASH encoding flag to escape all occurences of
199    ``/`` with ``\/``.
200
201* Bug fixes:
202
203  - Check for and reject NaN and Inf values for reals. Encoding these
204    values resulted in invalid JSON.
205
206  - Fix `json_real_set()` to return -1 on error.
207
208* Build:
209
210  - Jansson now builds on Windows with Visual Studio 2010, and
211    includes solution and project files in ``win32/vs2010/``
212    directory.
213
214  - Fix build warnings (#77, #78).
215
216  - Add ``-no-undefined`` to LDFLAGS (#90).
217
218* Tests:
219
220  - Fix the symbol exports test on Linux/PPC64 (#88).
221
222* Documentation:
223
224  - Fix typos (#73, #84).
225
226
227Version 2.3.1
228=============
229
230Released 2012-04-20
231
232* Build issues:
233
234  - Only use ``long long`` if ``strtoll()`` is also available.
235
236* Documentation:
237
238  - Fix the names of library version constants in documentation. (#52)
239
240  - Change the tutorial to use GitHub API v3. (#65)
241
242* Tests:
243
244  - Make some tests locale independent. (#51)
245
246  - Distribute the library exports test in the tarball.
247
248  - Make test run on shells that don't support the ``export FOO=bar``
249    syntax.
250
251
252Version 2.3
253===========
254
255Released 2012-01-27
256
257* New features:
258
259  - `json_unpack()` and friends: Add support for optional object keys
260    with the ``{s?o}`` syntax.
261
262  - Add `json_object_update_existing()` and
263    `json_object_update_missing()`, for updating only existing keys or
264    only adding missing keys to an object. (#37)
265
266  - Add `json_object_foreach()` for more convenient iteration over
267    objects. (#45, #46)
268
269  - When decoding JSON, write the number of bytes that were read from
270    input to ``error.position`` also on success. This is handy with
271    ``JSON_DISABLE_EOF_CHECK``.
272
273  - Add support for decoding any JSON value, not just arrays or
274    objects. The support is enabled with the new ``JSON_DECODE_ANY``
275    flag. Patch by Andrea Marchesini. (#4)
276
277* Bug fixes
278
279  - Avoid problems with object's serial number growing too big. (#40,
280    #41)
281
282  - Decoding functions now return NULL if the first argument is NULL.
283    Patch by Andrea Marchesini.
284
285  - Include ``jansson_config.h.win32`` in the distribution tarball.
286
287  - Remove ``+`` and leading zeros from exponents in the encoder.
288    (#39)
289
290  - Make Jansson build and work on MinGW. (#39, #38)
291
292* Documentation
293
294  - Note that the same JSON values must not be encoded in parallel by
295    separate threads. (#42)
296
297  - Document MinGW support.
298
299
300Version 2.2.1
301=============
302
303Released 2011-10-06
304
305* Bug fixes:
306
307  - Fix real number encoding and decoding under non-C locales. (#32)
308
309  - Fix identifier decoding under non-UTF-8 locales. (#35)
310
311  - `json_load_file()`: Open the input file in binary mode for maximum
312    compatiblity.
313
314* Documentation:
315
316  - Clarify the lifecycle of the result of the ``s`` fromat of
317    `json_unpack()`. (#31)
318
319  - Add some portability info. (#36)
320
321  - Little clarifications here and there.
322
323* Other:
324
325  - Some style fixes, issues detected by static analyzers.
326
327
328Version 2.2
329===========
330
331Released 2011-09-03
332
333* New features:
334
335  - `json_dump_callback()`: Pass the encoder output to a callback
336    function in chunks.
337
338* Bug fixes:
339
340  - `json_string_set()`: Check that target is a string and value is
341    not NULL.
342
343* Other:
344
345  - Documentation typo fixes and clarifications.
346
347
348Version 2.1
349===========
350
351Released 2011-06-10
352
353* New features:
354
355  - `json_loadb()`: Decode a string with a given size, useful if the
356    string is not null terminated.
357
358  - Add ``JSON_ENCODE_ANY`` encoding flag to allow encoding any JSON
359    value. By default, only arrays and objects can be encoded. (#19)
360
361  - Add ``JSON_REJECT_DUPLICATES`` decoding flag to issue a decoding
362    error if any JSON object in the input contins duplicate keys. (#3)
363
364  - Add ``JSON_DISABLE_EOF_CHECK`` decoding flag to stop decoding after a
365    valid JSON input. This allows other data after the JSON data.
366
367* Bug fixes:
368
369  - Fix an additional memory leak when memory allocation fails in
370    `json_object_set()` and friends.
371
372  - Clear errno before calling `strtod()` for better portability. (#27)
373
374* Building:
375
376  - Avoid set-but-not-used warning/error in a test. (#20)
377
378* Other:
379
380  - Minor clarifications to documentation.
381
382
383Version 2.0.1
384=============
385
386Released 2011-03-31
387
388* Bug fixes:
389
390  - Replace a few `malloc()` and `free()` calls with their
391    counterparts that support custom memory management.
392
393  - Fix object key hashing in json_unpack() strict checking mode.
394
395  - Fix the parentheses in ``JANSSON_VERSION_HEX`` macro.
396
397  - Fix `json_object_size()` return value.
398
399  - Fix a few compilation issues.
400
401* Portability:
402
403  - Enhance portability of `va_copy()`.
404
405  - Test framework portability enhancements.
406
407* Documentation:
408
409  - Distribute ``doc/upgrading.rst`` with the source tarball.
410
411  - Build documentation in strict mode in ``make distcheck``.
412
413
414Version 2.0
415===========
416
417Released 2011-02-28
418
419This release is backwards incompatible with the 1.x release series.
420See the chapter "Upgrading from older versions" in documentation for
421details.
422
423* Backwards incompatible changes:
424
425  - Unify unsigned integer usage in the API: All occurences of
426    unsigned int and unsigned long have been replaced with size_t.
427
428  - Change JSON integer's underlying type to the widest signed integer
429    type available, i.e. long long if it's supported, otherwise long.
430    Add a typedef json_int_t that defines the type.
431
432  - Change the maximum indentation depth to 31 spaces in encoder. This
433    frees up bits from the flags parameter of encoding functions
434    `json_dumpf()`, `json_dumps()` and `json_dump_file()`.
435
436  - For future needs, add a flags parameter to all decoding functions
437    `json_loadf()`, `json_loads()` and `json_load_file()`.
438
439* New features
440
441  - `json_pack()`, `json_pack_ex()`, `json_vpack_ex()`: Create JSON
442    values based on a format string.
443
444  - `json_unpack()`, `json_unpack_ex()`, `json_vunpack_ex()`: Simple
445    value extraction and validation functionality based on a format
446    string.
447
448  - Add column, position and source fields to the ``json_error_t``
449    struct.
450
451  - Enhance error reporting in the decoder.
452
453  - ``JANSSON_VERSION`` et al.: Preprocessor constants that define the
454    library version.
455
456  - `json_set_alloc_funcs()`: Set custom memory allocation functions.
457
458* Fix many portability issues, especially on Windows.
459
460* Configuration
461
462  - Add file ``jansson_config.h`` that contains site specific
463    configuration. It's created automatically by the configure script,
464    or can be created by hand if the configure script cannot be used.
465    The file ``jansson_config.h.win32`` can be used without
466    modifications on Windows systems.
467
468  - Add a section to documentation describing how to build Jansson on
469    Windows.
470
471  - Documentation now requires Sphinx 1.0 or newer.
472
473
474Version 1.3
475===========
476
477Released 2010-06-13
478
479* New functions:
480
481  - `json_object_iter_set()`, `json_object_iter_set_new()`: Change
482    object contents while iterating over it.
483
484  - `json_object_iter_at()`: Return an iterator that points to a
485    specific object item.
486
487* New encoding flags:
488
489  - ``JSON_PRESERVE_ORDER``: Preserve the insertion order of object
490    keys.
491
492* Bug fixes:
493
494  - Fix an error that occured when an array or object was first
495    encoded as empty, then populated with some data, and then
496    re-encoded
497
498  - Fix the situation like above, but when the first encoding resulted
499    in an error
500
501* Documentation:
502
503  - Clarify the documentation on reference stealing, providing an
504    example usage pattern
505
506
507Version 1.2.1
508=============
509
510Released 2010-04-03
511
512* Bug fixes:
513
514  - Fix reference counting on ``true``, ``false`` and ``null``
515  - Estimate real number underflows in decoder with 0.0 instead of
516    issuing an error
517
518* Portability:
519
520  - Make ``int32_t`` available on all systems
521  - Support compilers that don't have the ``inline`` keyword
522  - Require Autoconf 2.60 (for ``int32_t``)
523
524* Tests:
525
526  - Print test names correctly when ``VERBOSE=1``
527  - ``test/suites/api``: Fail when a test fails
528  - Enhance tests for iterators
529  - Enhance tests for decoding texts that contain null bytes
530
531* Documentation:
532
533  - Don't remove ``changes.rst`` in ``make clean``
534  - Add a chapter on RFC conformance
535
536
537Version 1.2
538===========
539
540Released 2010-01-21
541
542* New functions:
543
544  - `json_equal()`: Test whether two JSON values are equal
545  - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
546    of JSON values
547  - Add a version of all functions taking a string argument that
548    doesn't check for valid UTF-8: `json_string_nocheck()`,
549    `json_string_set_nocheck()`, `json_object_set_nocheck()`,
550    `json_object_set_new_nocheck()`
551
552* New encoding flags:
553
554  - ``JSON_SORT_KEYS``: Sort objects by key
555  - ``JSON_ENSURE_ASCII``: Escape all non-ASCII Unicode characters
556  - ``JSON_COMPACT``: Use a compact representation with all unneeded
557    whitespace stripped
558
559* Bug fixes:
560
561  - Revise and unify whitespace usage in encoder: Add spaces between
562    array and object items, never append newline to output.
563  - Remove const qualifier from the ``json_t`` parameter in
564    `json_string_set()`, `json_integer_set()` and `json_real_set`.
565  - Use ``int32_t`` internally for representing Unicode code points
566    (int is not enough on all platforms)
567
568* Other changes:
569
570  - Convert ``CHANGES`` (this file) to reStructured text and add it to
571    HTML documentation
572  - The test system has been refactored. Python is no longer required
573    to run the tests.
574  - Documentation can now be built by invoking ``make html``
575  - Support for pkg-config
576
577
578Version 1.1.3
579=============
580
581Released 2009-12-18
582
583* Encode reals correctly, so that first encoding and then decoding a
584  real always produces the same value
585* Don't export private symbols in ``libjansson.so``
586
587
588Version 1.1.2
589=============
590
591Released 2009-11-08
592
593* Fix a bug where an error message was not produced if the input file
594  could not be opened in `json_load_file()`
595* Fix an assertion failure in decoder caused by a minus sign without a
596  digit after it
597* Remove an unneeded include of ``stdint.h`` in ``jansson.h``
598
599
600Version 1.1.1
601=============
602
603Released 2009-10-26
604
605* All documentation files were not distributed with v1.1; build
606  documentation in make distcheck to prevent this in the future
607* Fix v1.1 release date in ``CHANGES``
608
609
610Version 1.1
611===========
612
613Released 2009-10-20
614
615* API additions and improvements:
616
617  - Extend array and object APIs
618  - Add functions to modify integer, real and string values
619  - Improve argument validation
620  - Use unsigned int instead of ``uint32_t`` for encoding flags
621
622* Enhance documentation
623
624  - Add getting started guide and tutorial
625  - Fix some typos
626  - General clarifications and cleanup
627
628* Check for integer and real overflows and underflows in decoder
629* Make singleton values thread-safe (``true``, ``false`` and ``null``)
630* Enhance circular reference handling
631* Don't define ``-std=c99`` in ``AM_CFLAGS``
632* Add C++ guards to ``jansson.h``
633* Minor performance and portability improvements
634* Expand test coverage
635
636
637Version 1.0.4
638=============
639
640Released 2009-10-11
641
642* Relax Autoconf version requirement to 2.59
643* Make Jansson compile on platforms where plain ``char`` is unsigned
644* Fix API tests for object
645
646
647Version 1.0.3
648=============
649
650Released 2009-09-14
651
652* Check for integer and real overflows and underflows in decoder
653* Use the Python json module for tests, or simplejson if the json
654  module is not found
655* Distribute changelog (this file)
656
657
658Version 1.0.2
659=============
660
661Released 2009-09-08
662
663* Handle EOF correctly in decoder
664
665
666Version 1.0.1
667=============
668
669Released 2009-09-04
670
671* Fixed broken `json_is_boolean()`
672
673
674Version 1.0
675===========
676
677Released 2009-08-25
678
679* Initial release
680