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.

16 lines
258 B

  1. #include <json.hpp>
  2. using json = nlohmann::json;
  3. int main()
  4. {
  5. // create a JSON value
  6. json a = 23;
  7. // move contents of a to b
  8. json b(std::move(a));
  9. // serialize the JSON arrays
  10. std::cout << a << '\n';
  11. std::cout << b << '\n';
  12. }