1
0
mirror of https://github.com/nlohmann/json synced 2024-12-28 03:11:07 +00:00
nlohmannjson/doc/examples/basic_json__number_integer_t.cpp
2016-01-30 20:23:14 +01:00

15 lines
238 B
C++

#include <json.hpp>
using json = nlohmann::json;
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';
}