1
0
mirror of https://github.com/nlohmann/json synced 2024-11-15 08:40:05 +00:00
nlohmannjson/doc/examples/basic_json__array_t.cpp
2015-06-21 21:24:03 +02:00

16 lines
274 B
C++

#include <json.hpp>
using namespace nlohmann;
int main()
{
// create an array_t value
json::array_t value = {"one", "two", 3, 4.5, false};
// create a JSON array from the value
json j(value);
// serialize the JSON array
std::cout << j << '\n';
}