Open damianpuci opened 6 years ago
It does return the pointer to rapidjson::Value
:
template <typename T>
typename T::ValueType* GetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0);
So I will get "1.0", yes?
Your question is quite confusing to me... It returns a point to Value
and you need to call Value::GetDouble()
to get the numerical value 1.0
.
Hi, @damianpuci . I am currently stuck at a place where I need to retrieve the path to a given node. Can you please share the code?
My json structure looks like this:
I have recursive function to search node by name so I can create string with path to this node. Let suppose that we want to get node "version". This is how string with path will look like:
"/main_node/child_node3/version"
. I don't want to get value of this node("1.0") which I can get by callingrapidjson::GetValueByPointer(this->jsonDocument, rapidjson::Pointer(path2Parent));
Is there any way to get whole node as a pointer to rapidjson::Value type?