You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
296 B

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