Sha256: 02f0ac22d40cf11d772be83baf4e7b25937269d45ddba189cd27965406668adf
Contents?: true
Size: 457 Bytes
Versions: 1
Compression:
Stored size: 457 Bytes
Contents
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { try { // parsing input with a syntax error json::parse("[1,2,3,]"); } catch (json::parse_error& e) { // output exception information std::cout << "message: " << e.what() << '\n' << "exception id: " << e.id << '\n' << "byte position of error: " << e.byte << std::endl; } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/doc/examples/parse_error.cpp |