! @brief returns the parent of this JSON pointer @return parent of this JSON pointer; in case this JSON pointer is the root, the root itself is returned @complexity Linear in the length of the JSON pointer. @liveexample{The example shows the result of `parent_pointer` for different JSON Pointers.,json_pointer__parent_pointer} @since version 3.6.0 */
| 8628 | @since version 3.6.0 |
| 8629 | */ |
| 8630 | json_pointer parent_pointer() const |
| 8631 | { |
| 8632 | if (empty()) |
| 8633 | { |
| 8634 | return *this; |
| 8635 | } |
| 8636 | |
| 8637 | json_pointer res = *this; |
| 8638 | res.pop_back(); |
| 8639 | return res; |
| 8640 | } |
| 8641 | |
| 8642 | /*! |
| 8643 | @brief remove last reference token |