! @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 */
| 10293 | @since version 3.6.0 |
| 10294 | */ |
| 10295 | json_pointer parent_pointer() const |
| 10296 | { |
| 10297 | if (empty()) |
| 10298 | { |
| 10299 | return *this; |
| 10300 | } |
| 10301 | |
| 10302 | json_pointer res = *this; |
| 10303 | res.pop_back(); |
| 10304 | return res; |
| 10305 | } |
| 10306 | |
| 10307 | /*! |
| 10308 | @brief remove last reference token |