1
0
mirror of https://github.com/nlohmann/json.git synced 2026-07-25 21:23:02 +04:00
Files
json/doc/examples/basic_json__const_int.cpp
T
2016-01-30 20:23:14 +01:00

16 lines
233 B
C++

#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';
}