CHANGES 19 KB

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