This repository was archived by the owner on Sep 27, 2024. It is now read-only.
Update dependency nlohmann_json_lib to v3.10.5 #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v3.4.0->v3.10.5Release Notes
nlohmann/json
v3.10.5Compare Source
Release date: 2022-01-03
SHA-256: e832d339d9e0c042e7dff807754769d778cf5d6ae9730ce21eed56de99cb5e86 (json.hpp), b94997df68856753b72f0d7a3703b7d484d4745c567f3584ef97c96c25a5798e (include.zip)
Summary
The previous version 3.10.4 introduced support to convert
std::filesystemobjects to JSON and vice versa. Unfortunately, we made the assumption that any compiler supporting C++17 would also have proper filesystem support. This was a mistake. This release introduces preprocessor checks (and means to override them) to make sure that the conversion support is only compiled if the compiler is detected to support it.All changes are backward-compatible.
💰 Note you can support this project via GitHub sponsors or PayPal.
🐛 Bug fixes
JSON_HAS_FILESYSTEMandJSON_HAS_EXPERIMENTAL_FILESYSTEMwhich can be set to0to avoid using filesystem support altogether.std::filesystem. #3090 #3097 #3101 #3156 #3203Warnings
⚡ Improvements
updatefunction to recursively merge objects with common keys. #3006 #3069std::hashandstd::swapto work on anynlohmann::basic_jsonspecializations rather than justnlohmann::json. #3121🔨 Further Changes
Tests and CI
Documentation
🔥 Deprecated functions
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 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 functionitems()instead.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.All deprecations are annotated with
HEDLEY_DEPRECATED_FORto report which function to use instead.v3.10.4Compare Source
Full Changelog
v3.10.3Compare Source
Full Changelog
v3.10.2Compare Source
Full Changelog
v3.10.1Compare Source
Full Changelog
JSON_DIAGNOSTICS assertion for ordered_json #2962
Inserting in unordered json using a pointer retains the leading slash #2958
Test #9: test-cbor test case sample.json fails in debug mode - Stack overflow #2955
3.10.0 broke at least the Bear project #2953
2 tests fail in 3.10.0: cmake_fetch_content_configure, cmake_fetch_content_build #2951
ctest (58+60,/67 cmake_import_configure) fails when build with -D JSON_Install:BOOL=OFF because of missing nlohmann_jsonTargets.cmake #2946
Document vcpkg usage #2944
Linker error LNK2005 when compiling (x64) json-3.10.0.zip with Visual Studio 2019 16.11.1 #2941
Move Travis jobs to travis-ci.com #2938
Fixed typo in docs/api/basic_json/parse.md #2968 (mb0202)
Add link to Homebrew package #2966 (nlohmann)
Fix parent update for diagnostics with ordered_json #2963 (nlohmann)
Set stack size for some unit tests when using MSVC #2961 (nlohmann)
Add regression test #2960 (nlohmann)
Update Travis badge #2959 (nlohmann)
Fix some extra ";" clang warnings #2957 (Hallot)
Add documentation for integration via vcpkg #2954 (nlohmann)
Avoid duplicate AppVeyor builds #2952 (nlohmann)
🚨 fix gdb_pretty_printer failure on basic types #2950 (senyai)
Add header to use value_t #2948 (nlohmann)
Skip some tests if JSON_Install is not set #2947 (nlohmann)
Remove outdated json_unit test binary #2945 (nlohmann)
Updating the Homebrew Command #2943 (amirmasoudabdol)
v3.10.0Compare Source
Full Changelog
Latest version 3.9.1 uses throw instead of JSON_THROW in the amalgamated json.hpp file #2934
Copy to a variable inside a Structure #2933
warning C4068: unknown pragma 'GCC' on MSVC/cl #2924
Errors during ninja test #2918
compiler warning: "not return a value" #2917
Comparison floating points causes warning #2909
Why can't I have std::vector<json&> testList? #2900
[json.hpp] from releases doesnt work #2897
g++ (11) -Wuseless-cast gives lots of warnings #2893
Cannot serialize and immediatly deserialize json to/from bson #2892
Floating-point precision conversion error #2876
How to avoid escaping for an already escaped string in .dump() #2870
can't parse std::vector<std::byte> #2869
ASAN detects memory leaks #2865
Binary subtype field cannot represent all CBOR tags #2863
string literals possibly being parsed as another type due to the presence of only digits and full-stops #2852
json::parse() works only with absolute paths #2851
Compiler Warnings on Raspberry Pi OS #2850
Braced initialization and aggregate initialization behavior is different for
json::array()function call. #28483.9.1: test suite is failing #2845
Documentation for macro JSON_NO_IO is missing #2842
Assertion failure when inserting into arrays with JSON_DIAGNOSTICS set #2838
HELP! There is a memory leak in the code?! #2837
Elegant conversion of a 2-D-json array to a standard C++ array #2805
Swift Package Manager support #2802
Referencing a subkey which doesn't exist gives crash #2797
Failed benchmark due to renamed branch #2796
Build Errors with VS 2019 and json Version 3.9.1 when attempting to replicate SAX Example #2782
Value with spaces cannot be parsed #2781
[Question] CBOR rfc support. #2779
Using JSON.hpp header file in Visual Studio 2013 (C++ Project) #2775
compilation error on clang-8 + C++17 #2759
Undefined symbol EOF #2755
Parsing a string into json object behaves differently under g++ and MinGW compilers. #2746
big git history size #2742
How to get reference of std::vector<T> #2735
CMake failure in VS2019 Community #2734
Possibility to use with custom c++ version to use in intel sgx enclaves #2730
Possibility to use without the dependency to file io and streams to use in intel sgx enclaves #2728
error C2784& error C2839... in my visual studio 2015 compiler #2726
-fno-expectionnot respected anymore in 3.9.1 #2725When exceptions disabled with JSON_NOEXCEPTION, lib just aborts without any message #2724
Critical error detected
c000037on windows10 msvc 2019 16.8.5 #2710unused parameter error/warning #2706
How to store data into a Map from json file #2691
Tests do not compile with pre-release glibc #2686
compile errors .... chromium-style #2680
.dump() not allowing compact form #2678
error: no matching function for call to ‘nlohmann::basic_json<>::value(int, std::set<int>&)’ #2671
Compiler warning: unused parameter #2668
Deserializing to a struct as shown on the project homepage throws compile time errors #2665
Unable to compile on MSVC 2019 with SDL checking enabled: This function or variable may be unsafe #2664
terminating with uncaught exception of type nlohmann::detail::type_error: [json.exception.type_error.302] type must be array, but is object #2661
unused-parameter on OSX when Diagnostics is off #2658
std::pair wrong serialization #2655
The result of json is_number_integer() function is wrong when read a json file #2653
2 backslash cause problem #2652
No support for using an external/system copy of Hedley #2651
error: incomplete type 'qfloat16' used in type trait expression #2650
Unused variable in exception class when not using improved diagnostics #2646
I am trying to do this - converting from wstring works incorrectly! #2642
Exception 207 On ARM Processor During Literal String Parsing #2634
double free or corruption (!prev) error on Json push_back and write #2632
nlohmann::detail::parse_error: syntax error while parsing CBOR string: expected length specification (0x60-0x7B) or indefinite string type (0x7F) #2629
please allow disabling implicit conversions in non-single-file use #2621
Preserve decimal formatting #2618
Visual Studio Visual Assist code issues reported by VA code inspection of file json.hpp #2615
Missing get function and no viable overloaded '=' on mac #2610
corruption when parse from string #2603
Parse from byte-vector results in compile error #2602
Memory leak when working on ARM Linux #2601
Unhandled exception in test-cbor.exe Stack overflow when debugging project with Visual Studio 2019 16.7.7 compiled with c++17 or c++latest #2598
Error in download_test_data.vcxproj when compiling with Visual Studio 2019 16.7.7 Professional msbuild on Windows 10 2004 Professional #2594
Warnings C4715 and C4127 when building json-3.9.1 with Visual Studio 2019 16.7.7 #2592
I tried some change to dump() for [1,2,3...] #2584
try/catch block does not catch parsing error #2579
Serializing uint64_t is broken for large values #2578
deserializing arrays should be part of the library #2575
Deserialization to std::array with non-default constructable types fails #2574
Compilation error when trying to use same type for number_integer_t and number_unsigned_t in basic_json template specification. #2573
compiler error: directive output may be truncated writing between 2 and 8 bytes #2572
Incorrect convert map to json when key cannot construct an string i.e. int #2564
no matching function for call to ‘nlohmann::basic_json<>::basic_json(<brace-enclosed initializer list>)’ #2559
type_error factory creates a dangling pointer (in VisualStudio 2019) #2535
Cannot assign from ordered_json vector<CustomStruct> to value in not ordered json #2528
Qt6: Break changes #2519
valgrind memcheck Illegal instruction when use nlohmann::json::parse #2518
Buffer overflow #2515
Including CTest in the top-level CMakeLists.txt sets BUILD_TESTING=ON for parent projects #2513
Compilation error when using NLOHMANN_JSON_SERIALIZE_ENUM ordered_json on libc++ #2491
Missing "void insert( InputIt first, InputIt last );" overload in nlohmann::ordered_map #2490
Could not find a package configuration file provided by "nlohmann_json" #2482
json becomes empty for unknown reason #2470
Using std::wstring as StringType fails compiling #2459
Sample code in GIF slide outdated (cannot use emplace() with array) #2457
from_json<std::wstring> is treated as an array on latest MSVC #2453
MemorySanitizer: use-of-uninitialized-value #2449
I need help #2441
type conversion failing with clang ext_vector_type #2436
json::parse() can't be resolved under specific circumstances #2427
from_*(ptr, len) deprecation #2426
Error ONLY in release mode #2425
"Custom data source" exemple make no sense #2423
Compile errors #2421
Refuses to compile in project #2419
Compilation failure of tests with C++20 standard (caused by change of u8 literals) #2413
No matching function for call to 'input_adapter' under Xcode of with nlohmann version 3.9.1 #2412
Git tags are not valid semvers #2409
after dump, stderr output disappear #2403
Using custom string. #2398
value() throws unhandled exception for partially specified json object #2393
assertion on runtime causes program to stop when accessing const json with missing key #2392
Usage with -fno-elide-constructors causes dump() output to be array of
nulls #2387Build fails with clang-cl due to override of CMAKE_CXX_COMPILER(?) #2384
std::optional not working with primitive types #2383
Unexpected array when initializing a json const& on gcc 4.8.5 using uniform syntax #2370
setprecision support #2362
json::parse(allow_exceptions = false) documentation is misleading. #2360
std::begin and std::end usage without specifying std namespace #2359
Custom object conversion to json hangs in background thread #2358
Add support of nullable fields to NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE and NLOHMANN_DEFINE_TYPE_INTRUSIVE #2356
the portfile for the vcpkg is not working. #2351
Compiler warns of implicit fallthrough when defining preprocessor macro NDEBUG #2348
Compile error on Intel compiler running in Windows #2346
Build error caused by overwriting CMAKE_CXX_COMPILER #2343
Error: an attribute list cannot appear here JSON_HEDLEY_DEPRECATED_FOR #2342
compiler warning #2341
3.9.0: tests make build non-reproducible #2324
Initialization different between gcc/clang #2311
Attempt to
get()a numeric value as a type which cannot represent it should throw #2310Surprising behaviour with overloaded operators #2256
ADL issue in input_adapter #2248
Output adapters should be templated. #2172
error when using nlohmann::json, std::function and std::bind #2147
Remove undefined behavior for const operator[] #2111
json({}) gives null instead of empty object with GCC and -std=c++17 #2046
GDB pretty printing support #1952
Always compile tests with all warnings enabled and error out on warnings #1798
Fixes Cppcheck warnings #1759
How to get position info or parser context with custom from_json() that may throw exceptions? #1508
Suggestion to improve value() accessors with respect to move semantics #1275
Add Key name to Exception #932
Overwork warning flags #2936 (nlohmann)
Treat MSVC warnings as errors #2930 (nlohmann)
All: fix warnings when compiling with -Wswitch-enum #2927 (fhuberts)
Guard GCC pragmas #2925 (nlohmann)
Supress -Wfloat-equal on intended float comparisions #2911 (Finkman)
Fix binary subtypes #2908 (nlohmann)
Fix useless-cast warnings #2902 (nlohmann)
Add regression test #2898 (nlohmann)
Refactor Unicode tests #2889 (nlohmann)
CMake cleanup #2885 (nlohmann)
Avoid string in case of empty CBOR objects #2879 (nlohmann)
Suppress C4127 warning in unit-json_pointer.cpp #2875 (nlohmann)
Fix truncation warning #2874 (nlohmann)
Fix memory leak in to_json #2872 (nlohmann)
Fix assertion failure in diagnostics #2866 (nlohmann)
Update documentation #2861 (nlohmann)
Consistency with
usingin README.md #2826 (justanotheranonymoususer)Properly constrain the basic_json conversion operator #2825 (ldionne)
Fix CI #2817 (nlohmann)
Specified git branch for google benchmark fetch in benchmark test #2795 (grafail)
Add C++ standards to macOS matrix #2790 (nlohmann)
Update URLs to HTTPS #2789 (TotalCaesar659)
Link to Conan Center package added #2771 (offa)
Keep consistent formatting #2770 (jasmcaus)
Add a cmake option to use SYSTEM in target_include_directories #2762 (jpl-mac)
replace EOF with std::char_traits<char>::eof() #2756 (nlohmann)
Fix typo in README #2754 (mortenfyhn)
Update documentation #2749 (nlohmann)
Add documentation for numbers #2747 (nlohmann)
Use Clang 12 in CI #2737 (nlohmann)
Fixes #2730 #2731 (theShmoo)
Possibility to use without the dependency to file io and streams to use in intel sgx enclaves #2729 (theShmoo)
Update json.hpp #2707 (raduteo)
pkg-config.pc.in: Don't concatenate paths #2690 (doronbehar)
add more CI steps #2689 (nlohmann)
Update doctest from 2.4.4 to 2.4.6 (fixes #2686) #2687 (musicinmybrain)
License fix #2683 (nlohmann)
Update parse_exceptions.md - correct
json::exception::parse_error#2679 (frasermarlow)Remove HEDLEY annotation from exception::what() #2673 (remyjette)
Fix amount of entries in the json object #2659 (abbaswasim)
Fix missing 1.78 in example in README.md #2625 (wawiesel)
Add GDB pretty printer #2607 (nlohmann)
readme: fix tilde character display #2582 (bl-ue)
Add support for deserialization of STL containers of non-default constructable types (fixes #2574). #2576 (AnthonyVH)
Better diagnostics #2562 (nlohmann)
CI targets #2561 (nlohmann)
Add switch to skip non-reproducible tests. #2560 (nlohmann)
Fix compilation of input_adapter(container) in edge cases #2553 (jasujm)
Allow parsing from std::byte containers #2550 (nlohmann)
Travis doesn't run any tests in C++17 mode #2540 (karzhenkov)
Doctest is updated to v2.4.3 #2538 (YarikTH)
Fix warnings #2537 (nlohmann)
Fix a shadowing warning #2536 (nlohmann)
Clarify license of is_complete_type implementation #2534 (nlohmann)
Do not unconditionally redefine C++14 constructs #2533 (nlohmann)
Doctest is updated to v2.4.1 #2525 (YarikTH)
Add MAIN_PROJECT check for test and install options #2514 (globberwops)
Ranged insert test section is added in unit-ordered_json.cpp #2512 (YarikTH)
Add asserts to suppress C28020 #2447 (jbzdarkid)
Change argument name "subtype" in byte_container_with_subtype #2444 (linev)
📝 add CPM.Cmake example #2406 (leozz37)
Fix move constructor of json_ref #2405 (karzhenkov)
Properly select "Release" build for Travis #2375 (karzhenkov)
Update Hedley #2367 (nlohmann)
Fix and extend documentation of discarded values #2363 (nlohmann)
Fix typos in documentation #2354 (rbuch)
Remove "#define private public" from tests #2352 (nlohmann)
Remove -Wimplicit-fallthrough warning #2349 (nlohmann)
Fix code to work without exceptions #2347 (nlohmann)
fix cmake script overwriting compiler path #2344 (ongjunjie)
v3.9.1Compare Source
Full Changelog
Can't parse not formatted JSON. #2340
parse returns desired array contained in array when JSON text begins with square bracket on gcc 7.5.0 #2339
Unexpected deserialization difference between Mac and Linux #2338
Reading ordered_json from file causes compile error #2331
ignore_comment=true fails on multiple consecutive lines starting with comments #2330
Update documentation about Homebrew installation and CMake integration - Homebrew #2326
Chinese character initialize error #2325
json.update and vector<pair>does not work with ordered_json #2315
Ambiguous call to overloaded function #2210
Fix fallthrough warning #2333 (nlohmann)
Fix lexer to properly cope with repeated comments #2332 (nlohmann)
Fix name of Homebrew formula in documentation #2327 (nlohmann)
fix typo #2320 (wx257osn2)
Fix a bug due to missing overloads in ordered_map container #2319 (nlohmann)
cmake: install pkg-config file relative to current_binary_dir #2318 (eli-schwartz)
Fixed installation of pkg-config file on other than Ubuntu #2314 (xvitaly)
v3.9.0Compare Source
Full Changelog
Unknown Type Name clang error when using NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE #2313
Clang 10.0 / GCC 10.1 warnings on disabled exceptions #2304
Application stalls indefinitely with message byte size 10 #2293
linker error #2292
Add support for high-precision numbers in UBJSON encoding #2286
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE fails if the length of the argument is 10 #2280
Custom types : MACRO expansion bug #2267
to/from_json Failing To Convert String #2238
clang 9.0 report warning: unused type alias 'size_type' [-Wunused-local-typedef] #2221
Enormous array created when working with map<int,T> #2220
Can I disable sorting of json values #2219
Getting Qt types to work #2217
Convert to Qt QVariant #2216
How to custom serialize same data type of vector? #2215
json constructor does not support std::optional #2214
Failing to Parse Valid JSON #2209
(De-)Serialization of std::variant with namespaces #2208
Addint support for complex type #2207
array_index possible out of range #2205
Object deserialized as array #2204
Sending to a function a reference to a sub-branch #2200
How to Serialize derived class to JSON object? #2199
JSON incorrectly serialized #2198
Exception Unhandled out_of_range error #2197
msgpack serialisation : float is treated as 64bit float, not 32bit float. #2196
Is it possible to use compile-time type guarantees for JSON structures? #2195
Question : performance against python dict #2194
vs2017 compile error #2192
Check if a key exists #2191
Failed to run tests due to missing test data on builders without Internet access #2190
3.8.0: unit-cbor.cpp test failures #2189
'nlohmann/json.hpp' file not found #2188
How to send json data over the wire? #2185
Ubuntu 16 not supporting nlohmann/json? #2184
.get<std::string> causing emdash errors #2180
Object properties should not be re-sorted alphabetically #2179
Custom type registration : instrusive API #2175
Many version of the function "void to_json(json& j, const MyStruct& struct)" #2171
How should strings be escaped? #2155
Adding a value to an existing json puts it at the beginning instead of the end #2149
The header file is big, can we use what we need. #2134
Changing the default format for unordered_map (or other set) #2132
Getting size of deserialized bson document #2131
implicit conversion failure #2128
Error thrown when parsing in a subclass #2124
explicit conversion to string not considered for std::map keys in GCC8 #2096
Add support for JSONC #2061
Library provides template arg for string_type but assumes std::string in some places #2059
incremental parsing with sax_parser #2030
Question about flatten and unflatten #1989
CBOR parser doesn't skip tags #1968
Compilation failure using Clang on Windows #1898
Fail to build when including json.hpp as a system include #1818
Parsing string into json doesn't preserve the order correctly. #1817
[C++17] Allow std::optional to convert to nlohmann::json #1749
How can I save json object in file in order? #1717
Support for Comments #1513
clang compiler: error : unknown type name 'not' #1119
dump() without alphabetical order #1106
operator T() considered harmful #958
Order of the elements in JSON object #952
How to prevent alphabetical sorting of data? #727
Why is an object ordering values by Alphabetical Order? #660
Feature request: Comments #597
Head Elements Sorting #543
Automatic ordered JSON #424
Support for comments. #376
Optional comment support. #363
Strip comments / Minify #294
maintaining order of keys during iteration #106
Update documentation #2312 (nlohmann)
Fix bug in CBOR tag handling #2308 (nlohmann)
added inline to NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE macro #2306 (jwittbrodt)
fixes unused variable 'ex' for #2304 #2305 (AODQ)
Cleanup #2303 (nlohmann)
Add test with multiple translation units #2301 (nlohmann)
Merge GitHub actions #2300 (nlohmann)
Fix unused parameter #2299 (nlohmann)
Add support for high-precision numbers in UBJSON encoding #2297 (nlohmann)
fix eof for get_binary and get_string #2294 (jprochazk)
Serialisation macros: increase upper bound on number of member variables #2287 (pfeatherstone)
add inline specifier for detail::combine #2285 (T0b1-iOS)
Add static assertion for missing binary function in SAX interface #2282 (nlohmann)
Add test for target_include_directories #2279 (nlohmann)
Clean up maintainer Makefiles and fix some linter warnings #2274 (nlohmann)
Add option to ignore CBOR tags #2273 (nlohmann)
Hash function without allocation #2269 (nlohmann)
Add ClangCL for MSVC #2268 (t-b)
Makefile: Always use SED variable #2264 (t-b)
Add Xcode 12 CI #2262 (nlohmann)
Make library work with Clang on Windows #2259 (nlohmann)
Add ordered_json specialization with ordered object keys #2258 (nlohmann)
Add pkg-config file #2253 (ericonr)
Fix regression from #2181 #2251 (nlohmann)
Tag binary values in cbor if set #2244 (matthewbauer)
Make assert configurable via JSON_ASSERT #2242 (nlohmann)
Add specialization of get_to #2233 (nlohmann)
Refine documentation of error_handler parameter #2232 (nlohmann)
Simplify conversion from/to custom types #2225 (nlohmann)
Remove unused typedefs #2224 (nlohmann)
Enable CMake policy CMP0077 #2222 (alexreinking)
Add option to ignore comments in parse/accept functions #2212 (nlohmann)
Fix Clang-Tidy warnings #2211 (nlohmann)
Simple ordered_json that works on all supported compilers [#2206](https://togithub.com/nlohmann
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.