Adjust CMake files to accept NEWCMake policies up to CMake 3.14. This fixes a nasty deprecation warning that "Compatibility with CMake < 3.5 will be removed from a future version of CMake". #4076 #4112
Fix CMake header path in install with custom CMAKE_INSTALL_INCLUDEDIR. #4194
Replace uses of INT_MIN/INT_MAX, etc. with std::numeric_limits and consistently use std-namespaced integer types to make library work with never GCC versions. #3722 #3723
Add missing files (json_fwd.hpp and Bazel build files) to release artifact include.zip. #3727 #3728
Fix 'declaration hides global declaration' warning. #3751
Fix natvis XML. #3858 #3863
Fix warning about moved from object. #3805 #3889
Remove a magic number to fix a warning. #3837 #3888
Fix debug pretty-printer by checking if match is valid before accessing group. #3919 #3920
Fix custom allocators by defining missing rebind type. #3895 #3927
Prevent memory leak when exception is thrown in adl_serializer::to_json #3881 #3901
Fix Clang-Tidy warnings. #4047
Fix init-list construction when size_type is not int. #4140
Fix deprecation warning "identifier _json preceded by whitespace in a literal operator declaration". #4129 #4161
Fix compile error with _HAS_STATIC_RTTI=0. #4046
Fix char_traits deprecation warning "char_traits<unsigned char> is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard". #4163 #4179
Feature
Allow custom base class as node customization point. This adds an additional template parameter which allows to set a custom base class for nlohmann::json. This class serves as an extension point and allows to add functionality to json node. Examples for such functionality might be metadata or additional member functions (e.g., visitors) or other application specific code. By default the parameter is set to void and an empty base class is used. In this case the library behaves as it already did. #3110
Add more specific parse error message when attempting to parse empty input. #4037 #4180
Add serialization-only user defined type macros (NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE and NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE). #3816
Add Bazel build support. If you are using Bazel you can simply reference this repository using http_archive or git_repository and depend on @nlohmann_json//:json. #3709
Support Apple's Swift Package Manager. #4010
CI
Use official Clang/GCC Docker containers in the CI. #3703
Add workflow to check if the source files area amalgamated. #3693
coverage: 100.0%. remained the same
when pulling df962081abf254c913c37b100b60a9bb55ec8641 on release/3.11.3
into 1d597743d89eec9a1b599bfc69e36db94a5fe05c on develop.
Bugs
NEW
CMake policies up to CMake 3.14. This fixes a nasty deprecation warning that "Compatibility with CMake < 3.5 will be removed from a future version of CMake". #4076 #4112CMAKE_INSTALL_INCLUDEDIR
. #4194<numeric>
header include. #3717 #3718 #3719INT_MIN
/INT_MAX
, etc. withstd::numeric_limits
and consistently usestd
-namespaced integer types to make library work with never GCC versions. #3722 #3723json_fwd.hpp
and Bazel build files) to release artifactinclude.zip
. #3727 #3728rebind
type. #3895 #3927adl_serializer::to_json
#3881 #3901size_type
is notint
. #4140_json
preceded by whitespace in a literal operator declaration". #4129 #4161_HAS_STATIC_RTTI=0
. #4046char_traits<unsigned char>
is deprecated:char_traits<T>
forT
not equal tochar
,wchar_t
,char8_t
,char16_t
orchar32_t
is non-standard". #4163 #4179Feature
nlohmann::json
. This class serves as an extension point and allows to add functionality to json node. Examples for such functionality might be metadata or additional member functions (e.g., visitors) or other application specific code. By default the parameter is set tovoid
and an empty base class is used. In this case the library behaves as it already did. #3110NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE
andNLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE
). #3816http_archive
orgit_repository
and depend on@nlohmann_json//:json
. #3709CI
Documentation
CONTRIBUTING.md
thatmake pretty
is required for test updates. #4045const&
in docs. #4099Tests
std::ranges::equals
for range comparisons in test case. #3927 #3950unit-algorithm.cpp
. #4044