mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
Merge pull request #1434 from pboettch/develop
allow push_back() and pop_back() calls on json_pointer
This commit is contained in:
@ -11884,7 +11884,6 @@ class json_pointer
|
||||
return res;
|
||||
}
|
||||
|
||||
private:
|
||||
/*!
|
||||
@brief remove and return last reference pointer
|
||||
@throw out_of_range.405 if JSON pointer has no parent
|
||||
@ -11901,6 +11900,16 @@ class json_pointer
|
||||
return last;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief remove and return last reference pointer
|
||||
@throw out_of_range.405 if JSON pointer has no parent
|
||||
*/
|
||||
void push_back(const std::string& tok)
|
||||
{
|
||||
reference_tokens.push_back(tok);
|
||||
}
|
||||
|
||||
private:
|
||||
/// return whether pointer points to the root document
|
||||
bool is_root() const noexcept
|
||||
{
|
||||
|
Reference in New Issue
Block a user