1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-22 15:21:52 +03:00
Files
json/doc/examples/basic_json__const_int.cpp
2015-06-22 23:21:49 +02:00

16 lines
230 B
C++

#include <json.hpp>
using namespace nlohmann;
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';
}