mirror of
https://github.com/nlohmann/json.git
synced 2024-08-22 04:52:35 +02:00
15 lines
235 B
C++
15 lines
235 B
C++
|
#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';
|
||
|
}
|