blob: eae61a4a77ba16c9a4793c8697ef9ec238cc5eec [file] [log] [blame]
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
int main()
{
json j;
j["address"]["street"] = "Fake Street";
j["address"]["housenumber"] = "12";
try
{
int housenumber = j["address"]["housenumber"];
}
catch (const json::exception& e)
{
std::cout << e.what() << '\n';
}
}