mirror of
https://github.com/nlohmann/json.git
synced 2025-07-15 07:41:50 +03:00
more documentation
This commit is contained in:
15
doc/examples/basic_json__const_int.cpp
Normal file
15
doc/examples/basic_json__const_int.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#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';
|
||||
}
|
Reference in New Issue
Block a user