1
0
This repository has been archived on 2025-10-04. You can view files and clone it, but cannot push or open issues or pull requests.
Files
irrlicht-archive/source/lib/json/docs/examples/diagnostics_extended.cpp
2023-11-26 01:34:57 -05:00

23 lines
384 B
C++

#include <iostream>
# define JSON_DIAGNOSTICS 1
#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';
}
}