mirror of
https://github.com/nlohmann/json.git
synced 2024-08-23 13:32:28 +02:00
16 lines
276 B
C++
16 lines
276 B
C++
#include <json.hpp>
|
|
|
|
using json = nlohmann::json;
|
|
|
|
int main()
|
|
{
|
|
// create a string value
|
|
std::string s = "The quick brown fox jumps over the lazy dog.";
|
|
|
|
// create a JSON string value
|
|
json j = s;
|
|
|
|
// serialize the JSON string
|
|
std::cout << j << '\n';
|
|
}
|