| 147 | } |
| 148 | |
| 149 | void reverse_object_iterator() |
| 150 | { |
| 151 | ojson j; |
| 152 | j["city"] = "Toronto"; |
| 153 | j["province"] = "Ontario"; |
| 154 | j["country"] = "Canada"; |
| 155 | |
| 156 | for (auto it = j.object_range().crbegin(); it != j.object_range().crend(); ++it) |
| 157 | { |
| 158 | std::cout << it->key() << " => " << it->value().as<std::string>() << '\n'; |
| 159 | } |
| 160 | std::cout << "\n"; |
| 161 | } |
| 162 | |
| 163 | int main() |
| 164 | { |