mirror of
https://github.com/nlohmann/json.git
synced 2024-08-23 21:42:29 +02:00
16 lines
293 B
C++
16 lines
293 B
C++
|
#include <json.hpp>
|
||
|
|
||
|
using namespace nlohmann;
|
||
|
|
||
|
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';
|
||
|
}
|