JSON for Modern C++ version 3.11.2
Release date: 2022-08-12 SHA-256: 665fa14b8af3837966949e8eb0052d583e2ac105d3438baba9951785512cf921 (json.hpp), e5c7a9f49a16814be27e4ed0ee900ecd0092bfb7dbfca65b5a421b774dccaaed (include.zip), 8c4b26bf4b422252e13f332bc5e388ec0ab5c3443d24399acb675e68278d341f (json.tar.xz)
Summary
This release fixes some bugs found in the 3.11.1 release. Furthermore, the of the namespace library has been re-structured.
All changes are backward-compatible.
:moneybag: Note you can support this project via GitHub sponsors or PayPal.
:bug: Bug Fixes
- Fix the
valuefunction which was broken for strings, size types, andnullptrin release 3.11.0. #3652 #3655 #3663 - Fix the
json_fwd.hppheader to be self-contained and add it to the single-header release. #3656 #3679 #3687 - Fix regression that broke using
json_pointeras key in associative containers. #3680 #3685 - Add missing constraint to deprecated JSON Pointer overloads of
containsandat. #3658 #3681 - Fix comparison between
json_pointerand strings with==and!=. These comparisons worked in 3.10.5, but were broken in 3.11.0 and 3.11.1. #3654 #3664 - Fix
to_jsonconversion ofstd::vector<bool>::referenceandstd::vector<bool>::const_referencefor STLs where these are the same asbasic_json::boolean_t&andbasic_json::boolean_t, respectively. #3677 #3678
:zap: Improvements
- Restructure inline namespace and allow version component to be disabled. See documentation. #3683 #3696 #3697 #3698
- Avoid heap allocations in BJData parser. #3637
:hammer: Further Changes
Documentation
- Publish documentation on every push to
developbranch. #3660 #3673 - Add missing examples for the public API. #3672 #3686
- Fix typo in
json_pointerdocumentation. #3692
Community
- Add a badge for the Discord chat to the README file. The goal of that additional communication channel beyond the existing ones is to quickly coordinate between the contributors. #3651
- Complete contributor list. #3662 #3670
CI
- Remove the
macos-10.15image from the CI as it is removed by GitHub Actions. #3612 #3615 #3626 - Remove hardcoded paths in Ubuntu workflow. #3626
- Only trigger AppVeyor builds if relevant files have been changed. #3626
- Fix CodeQL warning. #3626
- Harmonize naming of GitHub Actions jobs. #3661
- Add labeler action to automatically add PR labels based on the changed files. #3671 #3674 #3675
- Lint API documentation in the CI. #3672
- Add local LGTM configuration and suppress warnings on third-party scripts. #3643
:fire: Deprecated functions
- This release deprecates comparing JSON Pointers with strings via
operator==andoperator!=. To compare ajson_pointerpwith a strings, convertsto ajson_pointerfirst and usejson_pointer::operator==orjson_pointer::operator!=. #3684
The following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):
- The function
iterator_wrapperis deprecated. Please use the member functionitems()instead. - Functions
friend std::istream& operator<<(basic_json&, std::istream&)andfriend std::ostream& operator>>(const basic_json&, std::ostream&)are deprecated. Please usefriend std::istream& operator>>(std::istream&, basic_json&)andfriend operator<<(std::ostream&, const basic_json&)instead. - Passing iterator pairs or pointer/length pairs to parsing functions (
basic_json::parse,basic_json::accept,basic_json::sax_parse,basic_json::from_cbor,basic_json::from_msgpack,basic_json::from_ubjson,basic_json::from_bson) via initializer lists is deprecated. Instead, pass two iterators; for instance, callbasic_json::from_cbor(ptr, ptr+len)instead ofbasic_json::from_cbor({ptr, len}). - The implicit conversion from JSON Pointers to string (
json_pointer::operator string_t) is deprecated. Use instead.
All deprecations are annotated with HEDLEY_DEPRECATED_FOR to report which function to use instead.