| 46 | }; |
| 47 | |
| 48 | void example2() { |
| 49 | nest v{"Hi", {1, 2, 3}}, v2; |
| 50 | std::string s; |
| 51 | struct_json::to_json(v, s); |
| 52 | std::cout << s << std::endl; |
| 53 | struct_json::from_json(v2, s); |
| 54 | assert(v == v2); |
| 55 | }; |
| 56 | |
| 57 | void test_user_defined_struct() { |
| 58 | example1(); |