You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

822 lines
20KB

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