Release date: 2019-07-28
SHA-256: a503214947952b69f0062f572cb74c17582a495767446347ce2e452963fc2ca4 (json.hpp), 541c34438fd54182e9cdc68dd20c898d766713ad6d901fb2c6e28ff1f1e7c10d (include.zip)
This release introduces a few convenience functions and performs a lot of house keeping (bug fixes and small improvements). All changes are backward-compatible.
✨ New Features
- Add overload of the
containsfunction to check if a JSON pointer is valid without throwing exceptions, just like its counterpart for object keys. #1600
- Add a function
to_stringto allow for generic conversion to strings. #916 #1585
- Add return value for the
emplace_backfunction, returning a reference to the added element just like C++17 is introducing this for
- Add info how to use the library with the pacman package manager on MSYS2. #1670
🐛 Bug Fixes
- Fix an issue where typedefs with certain names yielded a compilation error. #1642 #1643
- Fix a conversion to
std::string_viewin the unit tests. #1634 #1639
- Fix MSVC Debug build. #1536 #1570 #1608
get_tomethod to clear existing content before writing. #1511 #1555
- Fix a
nodiscardattributes are now only used with Clang when
-std=c++17is used. #1535 #1551
- Switch from Catch to doctest for the unit tests which speeds up compilation and runtime of the 112,112,308 tests.
- Add an explicit section to the README about the frequently addressed topics character encoding, comments in JSON, and the order of object keys.
🔨 Further Changes
GNUInstallDirsto set library install directories. #1673
- Fix links in the README. #1620 #1621 #1622 #1623 #1625
jsontype on the documentation start page. #1616
- Complete documentation of
value()function with respect to
- Fix links in the documentation. #1598
- Add regression tests for MSVC. #1543 #1570
- Use CircleCI for continuous integration.
- Use Doozer for continuous integration on Linux (CentOS, Raspbian, Fedora)
- Add tests to check each CMake flag (
- Use Hedley to avoid re-inventing several compiler-agnostic feature macros like
JSON_HAS_CPP_17. Functions taking or returning pointers are annotated accordingly when a pointer will not be null.
- Build and run tests on AppVeyor in DEBUG and RELEASE mode.
🔥 Deprecated functions
This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
iterator_wrapperare deprecated. Please use the member function
friend std::istream& operator<<(basic_json&, std::istream&)and
friend std::ostream& operator>>(const basic_json&, std::ostream&)are deprecated. Please use
friend std::istream& operator>>(std::istream&, basic_json&)and
friend operator<<(std::ostream&, const basic_json&)instead.