mirror of
https://github.com/nlohmann/json
synced 2024-12-01 16:10:06 +00:00
16 lines
230 B
C++
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';
|
|
}
|