mirror of
https://github.com/nlohmann/json.git
synced 2025-07-15 07:41:50 +03:00
more documentation
This commit is contained in:
14
doc/examples/basic_json__number_integer_t.cpp
Normal file
14
doc/examples/basic_json__number_integer_t.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include <json.hpp>
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON number from number_integer_t
|
||||
json::number_integer_t value = 42;
|
||||
|
||||
json j(value);
|
||||
|
||||
// serialize the JSON numbers
|
||||
std::cout << j << '\n';
|
||||
}
|
Reference in New Issue
Block a user