json/doc/examples/basic_json__number_integer_t.cpp

15 lines
235 B
C++
Raw Normal View History

2015-06-22 22:44:20 +03:00
#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';
}