mirror of
https://github.com/nlohmann/json.git
synced 2025-07-13 20:21:48 +03:00
more documentation
This commit is contained in:
15
doc/examples/basic_json__string_t.cpp
Normal file
15
doc/examples/basic_json__string_t.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#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';
|
||||
}
|
Reference in New Issue
Block a user