Sha256: a6020bbead2149d6a7253559a64f460057dafbc5f205692817b5dfa5974a6285
Contents?: true
Size: 427 Bytes
Versions: 1
Compression:
Stored size: 427 Bytes
Contents
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { try { // calling push_back() on a string value json j = "string"; j.push_back("another string"); } catch (json::type_error& 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/type_error.cpp |