Sha256: c4c97f0e1c0570ade90c52f8f16e97773f40b374bc6575ed9809b80c9f041dc5
Contents?: true
Size: 432 Bytes
Versions: 1
Compression:
Stored size: 432 Bytes
Contents
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { try { // calling at() for a non-existing key json j = {{"foo", "bar"}}; json k = j.at("non-existing"); } catch (json::exception& e) { // output exception information std::cout << "message: " << e.what() << '\n' << "exception id: " << e.id << std::endl; } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/doc/examples/exception.cpp |