! @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 */
| 11825 | @since version 3.6.0 |
| 11826 | */ |
| 11827 | json_pointer parent_pointer() const |
| 11828 | { |
| 11829 | if (empty()) |
| 11830 | { |
| 11831 | return *this; |
| 11832 | } |
| 11833 | |
| 11834 | json_pointer res = *this; |
| 11835 | res.pop_back(); |
| 11836 | return res; |
| 11837 | } |
| 11838 | |
| 11839 | /*! |
| 11840 | @brief remove last reference token |