Draft: draft-ietf-jsonpath-base

Commentary: Exclude the node itself Define the term " descendants " more precisely Define the descendant selector semantics more thoroughly Fixes : 
 I would consider adding two additional examples : given : results in : - and results in : - ] ] 
 I extended the existing example attempting to exhibit the same points as the example above . 
 Looks good , thanks ! 
 Considering the following input : would evaluate to ( in this case the values of the object ): I would expect the descendant version : to evaluate to : Yet the example says : Considering the following pseudo logic : In the case of the would be an index wildcard selector . I would expect the descendant selector to ( starting by selecting itself ) walk through the json structure and select all the results by applying the child selector ( dot - member - name , index - selector , index - wild - selector , or wildcard ) on each traversed value . Am I misunderstanding something here or is this the intended behavior ? 
 Thanks for raising this . When I was writing the example , I noticed that only a few implementations included the node itself . But the descendant selector semantics currently say : and so I included the " starting " node itself . This is why I included the following text in the commit message : The semantics section needs improving anyway to clarify the semantics of the various forms of the descendants selector . I agree with the semantics proposed above , providing there is a consensus for this in the WG . 
 In my understanding descendant selector simply extends the single - level operating of child selector , in that it further recursively operates on all other descendant levels . So I agree to  's traversal algorithm above . A node is not considered a descendant of itself . Obviously I have not been aware of this behavior . 
 I have n't checked the examples , but I like the narrative changes .
Paragraph (version A):
JSONPath allows the wildcard symbol "*" to select any member of an
object or any element of an array (wildcard).  The descendant
operator ".." selects the node and all its descendants (descendant-
selector).  The array slice syntax "[start:end:step]" allows
selecting a regular selection of an element from an array, giving a
start position, an end position, and possibly a step value that moves
the position from the start to the end (slice).
Paragraph (version B):
JSONPath allows the wildcard symbol "*" to select any member of an
object or any element of an array (wildcard).  The descendant
operator ".." selects all the descendants (descendant-selector) of a
node.  The array slice syntax "[start:end:step]" allows selecting a
regular selection of an element from an array, giving a start
position, an end position, and possibly a step value that moves the
position from the start to the end (slice).
Paragraph (version A):
Nested descendants selector "..".
Paragraph (version B):
Descendants selector "..".
Paragraph (version A):
The "descendant-selector" selects the node and all its descendants.
Paragraph (version A):
In the resultant nodelist: * nodes occur before their children, and *
nodes of an array occur in array order.
Paragraph (version B):
the "..<name>" form (and the "..[<index>]" form where "<index>" is
a "quoted-member-name") selects those descendants of the node that
are member values of an object with the given member name.
Paragraph (version B):
the "..[<index>]" where "<index>" is an "element-index" selects
those descendants of the node that are array elements with the
given index.
Paragraph (version B):
the "..[*]" and "..*" forms select all the descendants of the
node.
Paragraph (version B):
nodes of an array occur in array order.
Paragraph (version A):
"{"o": {"j": 1, "k": 2}, "a": [5, 3]}" must appear before "{"j":
1, "k": 2}" and "[5, 3]",
Paragraph (version A):
"5" must appear before "3".
Paragraph (version B):
"[5, 3, [{"j": 4}]]" must appear before "5", "3", and "[{"j":
4}]",
Paragraph (version B):
"5" must appear before "3" which must appear before "[{"j": 4}]",
Paragraph (version B):
"{"j": 4}" must appear before "4".