У меня сложный json ответ. Я пытаюсь указать путь fecth json относительно>
{
"root" : {
"child1": {
"child2": {
"child3":{
"leaf":"value"
}
}
}
}
}
Используемый мной путь jsonpath выглядит следующим образом: root .child1.child2.child3.leaf
Но я ищу для возможности ..child3.leaf
, поэтому я могу использовать его как:
new JsonPath(json).getString("root.child1.child2.child3.leaf");
вместо:
new JsonPath(json).getString("..child3.leaf");