// Access DOM by Get(). It return nullptr if the value is not exist.
// Access DOM by Get(). It return nullptr if the value does not exist.
if(Value*stars=Pointer("/stars").Get(d))
stars->SetInt(stars->GetInt()+1);
...
...
@@ -98,7 +98,7 @@ The conventions are shown here for comparison:
# Resolving Pointer {#ResolvingPointer}
`Pointer::Get()` or `GetValueByPointer()` function does not modify the DOM. If the tokens cannot match a value in the DOM, it returns `nullptr`. User can use this to see whether a value is exists.
`Pointer::Get()` or `GetValueByPointer()` function does not modify the DOM. If the tokens cannot match a value in the DOM, it returns `nullptr`. User can use this to check whether a value exists.
Note that, numerical tokens can represent an array index or member name. The resolving process will match the values according to the types of value.
Besides, [RFC6901] defines a special token `-` (single minus sign), which means the pass-the-end value of an array. `Get()` only treats this token as a member name '"-"'. Yet the other functions can resolve this for array, equivalent to calling `Value::PushBack()` to the array.
Besides, [RFC6901] defines a special token `-` (single minus sign), which represents the pass-the-end element of an array. `Get()` only treats this token as a member name '"-"'. Yet the other functions can resolve this for array, equivalent to calling `Value::PushBack()` to the array.