• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <iostream>
2 #include <nlohmann/json.hpp>
3 
4 using json = nlohmann::json;
5 
main()6 int main()
7 {
8     // create a JSON value
9     json a = 23;
10 
11     // move contents of a to b
12     json b(std::move(a));
13 
14     // serialize the JSON arrays
15     std::cout << a << '\n';
16     std::cout << b << '\n';
17 }
18