basic_json__const_int.cpp 233 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include <json.hpp> using json = nlohmann::json; int main() { // an anonymous enum enum { t = 17 }; // create a JSON number from the enum json j(t); // serialize the JSON numbers std::cout << j << '\n'; }