Is there something like
jsonNode.put("/deep/path/to/var", "myval")
or something with ObjectNode?
I know there are ways to iterate over the jsonNode and put something inside but my Question is. How could I use "/deep/path/to/..." as String to modify a value in a JSOn or also inside a map or something similar?
For example what I have is
{"deep":{
"path": {
"to":"value"
}
}
And now I want to change it to
{"deep":{
"path": {
"to":"otherValue"
}
}
My wish is that I just write a path to the key and change the value without iterating through the tree.
What I don't like to do is:
myMap.get("deep").get("path").put("to","otherValue");
What I like is something fancy like:
mySuperfancyObject.put("deep/path/to", "otherValue");
Is this possible?