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.

17 lines
254 B

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