diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index b3ef9d2a7..ab067d27b 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -1609,11 +1609,11 @@ class binary_writer }; string_t key = "_ArrayType_"; - if (bjdtype.find(std::string(value.at(key))) == bjdtype.end()) + if (bjdtype.find(static_cast(value.at(key))) == bjdtype.end()) { return 1; } - CharType dtype = bjdtype[std::string(value.at(key))]; + CharType dtype = bjdtype[static_cast(value.at(key))]; key = "_ArraySize_"; std::size_t len = (value.at(key).empty() ? 0 : 1); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 3ac66c3a2..73495b8d3 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -15501,11 +15501,11 @@ class binary_writer }; string_t key = "_ArrayType_"; - if (bjdtype.find(std::string(value.at(key))) == bjdtype.end()) + if (bjdtype.find(static_cast(value.at(key))) == bjdtype.end()) { return 1; } - CharType dtype = bjdtype[std::string(value.at(key))]; + CharType dtype = bjdtype[static_cast(value.at(key))]; key = "_ArraySize_"; std::size_t len = (value.at(key).empty() ? 0 : 1);