CHANGES 14 KB

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