Skip to content

Commit

Permalink
WIP: allow starting with @
Browse files Browse the repository at this point in the history
  • Loading branch information
bettio committed Mar 19, 2021
1 parent 503dc89 commit c6423d8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions draft-ietf-jsonpath-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,15 @@ return an error.

## Syntax

Syntactically, a JSONPath consists of a root selector (`$`), which
selects the root node of a JSON value, followed by a possibly empty
sequence of *selectors*.
Syntactically, a JSONPath consists of either a root selector (`$`), which
selects the root node of a JSON value, or a current item selector (`@`),
followed by a possibly empty sequence of *selectors*.

~~~~ abnf
json-path = root-selector *selector
json-path = start-selector *selector
start-selector = root-selector / current-item-selector
root-selector = "$" ; $ selects document root node
current-item-selector = "@" ; @ selects current node
~~~~

The syntax and semantics of each selector is defined below.
Expand Down

0 comments on commit c6423d8

Please sign in to comment.