#json.hpp

3 messages · Page 1 of 1 (latest)

dull robin
#

When i try to compile the following code:

#include <iostream>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

int main() {
    return 0;
}

It throws the following error: 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 string, but is null

idk what is causing this i installed json.hpp with vcpkg
nlohmann-json:x64-windows 3.11.3#1 JSON for Modern C++

please help thanks

topaz plume
#

Error occurred because you were trying to store a string json value in a null variable