| 68 | YLT_REFL(person1, name, age); |
| 69 | |
| 70 | void use_smart_pointer() { |
| 71 | person1 p{std::make_shared<std::string>("tom"), |
| 72 | std::make_unique<int64_t>(42)}; |
| 73 | std::string str; |
| 74 | iguana::to_json(p, str); |
| 75 | |
| 76 | person1 p1; |
| 77 | iguana::from_json(p1, str); |
| 78 | |
| 79 | assert(*p1.name == "tom"); |
| 80 | assert(*p1.age == 42); |
| 81 | } |
| 82 | |
| 83 | void test_escape_serialize() { |
| 84 | #ifdef __linux__ |