Loading README.md +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ include(FetchContent) FetchContent_Declare(json GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohman_json GIT_TAG v3.6.0) GIT_TAG v3.6.1) FetchContent_GetProperties(json) if(NOT json_POPULATED) Loading include/nlohmann/json.hpp +10 −8 Original line number Diff line number Diff line /* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ | | |__ | | | | | | version 3.6.0 | | |__ | | | | | | version 3.6.1 |_____|_____|_____|_|___| https://github.com/nlohmann/json Licensed under the MIT License <http://opensource.org/licenses/MIT>. Loading Loading @@ -32,7 +32,7 @@ SOFTWARE. #define NLOHMANN_JSON_VERSION_MAJOR 3 #define NLOHMANN_JSON_VERSION_MINOR 6 #define NLOHMANN_JSON_VERSION_PATCH 0 #define NLOHMANN_JSON_VERSION_PATCH 1 #include <algorithm> // all_of, find, for_each #include <cassert> // assert Loading Loading @@ -3776,7 +3776,7 @@ class binary_reader default: // anything else not supported (yet) { std::array<char, 3> cr{}; std::array<char, 3> cr{{}}; (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type)); return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, "Unsupported BSON record type 0x" + std::string(cr.data()))); } Loading Loading @@ -5432,7 +5432,7 @@ class binary_reader */ std::string get_token_string() const { std::array<char, 3> cr{}; std::array<char, 3> cr{{}}; (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current)); return std::string{cr.data()}; } Loading Loading @@ -6858,7 +6858,7 @@ scan_number_done: if ('\x00' <= c and c <= '\x1F') { // escape control characters std::array<char, 9> cs{}; std::array<char, 9> cs{{}}; (std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c)); result += cs.data(); } Loading Loading @@ -11658,7 +11658,7 @@ inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e // assert(p2 <= std::numeric_limits<std::uint64_t>::max() / 10); assert(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); p2 *= 10; const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e Loading Loading @@ -13717,7 +13717,7 @@ class basic_json object = nullptr; // silence warning, see #821 if (JSON_UNLIKELY(t == value_t::null)) { JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.0")); // LCOV_EXCL_LINE JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.1")); // LCOV_EXCL_LINE } break; } Loading Loading @@ -18493,7 +18493,9 @@ class basic_json switch (lhs_type) { case value_t::array: return *lhs.m_value.array < *rhs.m_value.array; // note parentheses are necessary, see // https://github.com/nlohmann/json/issues/1530 return (*lhs.m_value.array) < (*rhs.m_value.array); case value_t::object: return *lhs.m_value.object < *rhs.m_value.object; Loading
README.md +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ include(FetchContent) FetchContent_Declare(json GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohman_json GIT_TAG v3.6.0) GIT_TAG v3.6.1) FetchContent_GetProperties(json) if(NOT json_POPULATED) Loading
include/nlohmann/json.hpp +10 −8 Original line number Diff line number Diff line /* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ | | |__ | | | | | | version 3.6.0 | | |__ | | | | | | version 3.6.1 |_____|_____|_____|_|___| https://github.com/nlohmann/json Licensed under the MIT License <http://opensource.org/licenses/MIT>. Loading Loading @@ -32,7 +32,7 @@ SOFTWARE. #define NLOHMANN_JSON_VERSION_MAJOR 3 #define NLOHMANN_JSON_VERSION_MINOR 6 #define NLOHMANN_JSON_VERSION_PATCH 0 #define NLOHMANN_JSON_VERSION_PATCH 1 #include <algorithm> // all_of, find, for_each #include <cassert> // assert Loading Loading @@ -3776,7 +3776,7 @@ class binary_reader default: // anything else not supported (yet) { std::array<char, 3> cr{}; std::array<char, 3> cr{{}}; (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type)); return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, "Unsupported BSON record type 0x" + std::string(cr.data()))); } Loading Loading @@ -5432,7 +5432,7 @@ class binary_reader */ std::string get_token_string() const { std::array<char, 3> cr{}; std::array<char, 3> cr{{}}; (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current)); return std::string{cr.data()}; } Loading Loading @@ -6858,7 +6858,7 @@ scan_number_done: if ('\x00' <= c and c <= '\x1F') { // escape control characters std::array<char, 9> cs{}; std::array<char, 9> cs{{}}; (std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c)); result += cs.data(); } Loading Loading @@ -11658,7 +11658,7 @@ inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e // assert(p2 <= std::numeric_limits<std::uint64_t>::max() / 10); assert(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); p2 *= 10; const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e Loading Loading @@ -13717,7 +13717,7 @@ class basic_json object = nullptr; // silence warning, see #821 if (JSON_UNLIKELY(t == value_t::null)) { JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.0")); // LCOV_EXCL_LINE JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.1")); // LCOV_EXCL_LINE } break; } Loading Loading @@ -18493,7 +18493,9 @@ class basic_json switch (lhs_type) { case value_t::array: return *lhs.m_value.array < *rhs.m_value.array; // note parentheses are necessary, see // https://github.com/nlohmann/json/issues/1530 return (*lhs.m_value.array) < (*rhs.m_value.array); case value_t::object: return *lhs.m_value.object < *rhs.m_value.object;