Recursive Tree Traversal #148
Replies: 2 comments 3 replies
-
+1 |
Beta Was this translation helpful? Give feedback.
-
I have drafted a very ugly working prototype for a new Recursive Traversal
AbstractMotivationSpecificationA new descendant = ".." identifier
descendant-expression = ( expression ) 1*( descendant )
expression =/ descendant-expression A ExamplesGiven the following JSON input: {
"name": "first",
"top": { "name": "second" },
"nested": {
"name": [
1, "string", false,
{ "name": "third" }
]
}
} The following expressions are possible:
Compliance TestsThis JEP standardizes a syntax that was formely not valid. For this reason, one of the syntax.json compliance tests must be changed or removed altogether: {
"expression": ".foo",
"error": "syntax"
},
{
"expression": "foo..bar",
- "error": "syntax"
+ "result": null
}, A new file |
Beta Was this translation helpful? Give feedback.
-
Please, consider adding features to do arbitrarily deep searches, much like the xpath query
//my-element/my-other-element
.Beta Was this translation helpful? Give feedback.
All reactions