more documentation
This commit is contained in:
parent
f1c9aa26c4
commit
48545f5b18
14 changed files with 486 additions and 78 deletions
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';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue