| 97 | } |
| 98 | |
| 99 | void max_nesting_path_example() |
| 100 | { |
| 101 | std::string s = "[[[[[[[[[[[[[[[[[[[[[\"Too deep\"]]]]]]]]]]]]]]]]]]]]]"; |
| 102 | try |
| 103 | { |
| 104 | auto options = json_options{} |
| 105 | .max_nesting_depth(20); |
| 106 | json::parse(s, options); |
| 107 | } |
| 108 | catch (const ser_error& e) |
| 109 | { |
| 110 | std::cout << e.what() << '\n'; |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | #if defined(JSONCONS_HAS_POLYMORPHIC_ALLOCATOR) && JSONCONS_HAS_POLYMORPHIC_ALLOCATOR == 1 |
| 115 | #include <memory_resource> |
no test coverage detected