! @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 */
| 11755 | @since version 3.6.0 |
| 11756 | */ |
| 11757 | json_pointer parent_pointer() const |
| 11758 | { |
| 11759 | if (empty()) |
| 11760 | { |
| 11761 | return *this; |
| 11762 | } |
| 11763 | |
| 11764 | json_pointer res = *this; |
| 11765 | res.pop_back(); |
| 11766 | return res; |
| 11767 | } |
| 11768 | |
| 11769 | /*! |
| 11770 | @brief remove last reference token |