| 82 | } |
| 83 | |
| 84 | void parse_error_example() |
| 85 | { |
| 86 | std::string s = "[1,2,3,4,]"; |
| 87 | try |
| 88 | { |
| 89 | json val = json::parse(s); |
| 90 | } |
| 91 | catch(const ser_error& e) |
| 92 | { |
| 93 | std::cout << "Caught ser_error with category " << e.code().category().name() |
| 94 | << ", code " << e.code().value() |
| 95 | << " and message " << e.what() << '\n'; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | void max_nesting_path_example() |
| 100 | { |