You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just compiled and installed the last version of nlohmann_json library with CMake.
I was reading JSON documents from Mongo. Converted Mongo documents to nlohmann_json::jsons.
after compiling and running it, I got this error: type must be number, but is it number.
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_3::detail::type_error'what(): [json.exception.type_error.302] type must be number, but is number
Compiler and operating system
Debian with g++-11
Library version
3.11.3
Validation
The bug also occurs if the latest version from the develop branch is used.
I did. After a few hundred records read from Mongo, it failed again with the same error. BTW, all PassedTime values are greater than zero (0).
P.S. How does nlohmann::json work with numbers? What makes a the type of a number nlohmann::json::value_t::number_integer or nlohmann::json::value_t::number_unsigned?
Description
Just compiled and installed the last version of nlohmann_json library with CMake.
I was reading JSON documents from Mongo. Converted Mongo documents to
nlohmann_json::json
s.after compiling and running it, I got this error:
type must be number, but is it number
.Reproduction steps
Expected vs. actual results
I expected an integer to be printed. As simple as that.
Minimal code example
Error messages
Compiler and operating system
Debian with g++-11
Library version
3.11.3
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: