1
0
mirror of https://github.com/nlohmann/json synced 2024-12-29 03:41:08 +00:00
nlohmannjson/doc/examples/basic_json__string_t.cpp
2016-01-30 20:23:14 +01:00

16 lines
296 B
C++

#include <json.hpp>
using json = nlohmann::json;
int main()
{
// create an string_t value
json::string_t value = "The quick brown fox jumps over the lazy doc";
// create a JSON string from the value
json j(value);
// serialize the JSON array
std::cout << j << '\n';
}