Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align (and simplify) terminology. #72

Merged
merged 5 commits into from
Mar 23, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions draft-ietf-jsonpath-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ Data Item:
composed of containers, namely JSON objects and arrays, and
of atomic data, namely null, true, false, numbers, and text strings.
Also called a JSON value.
In this document, often abbreviated to _item_.
cabo marked this conversation as resolved.
Show resolved Hide resolved

The term _node_ has the same meaning, but is used to emphasize the
location of an item within the Argument, i.e., an item identical to
or nested within the JSON data item to which the query is applied.

Object:
: A JSON object as defined in {{-json}}.
Expand All @@ -176,30 +181,31 @@ Name:
: The name in a name/value pair constituting a member. (Also known as
"key", "tag", or "label".)

Array:
: A JSON array as defined in {{-json}}.
Never used in its generic sense, e.g., for programming language objects.

Element:
: An item in an array. (Also used with a distinct meaning in XML
context for XML elements.)

Index:
: An unsigned number that identifies a specific element in an array.
cabo marked this conversation as resolved.
Show resolved Hide resolved
cabo marked this conversation as resolved.
Show resolved Hide resolved
The term, in particular in the form indexing, is also sometimes used
for either an index or a member name, when both arrays and objects
can be fed to the indexing operation.

Query:
: Short name for JSONPath expression.

Argument:
: Short name for the JSON data item a JSONPath expression is applied to.

Output Path:
: A simple form of JSONPath expression that identifies a Position by
providing a query that results in exactly that position. Similar
: A simple form of JSONPath expression that identifies a node by
providing a query that results in exactly that node. Similar
to, but syntactically different from, a JSON Pointer {{-pointer}}.

Position:
: A JSON data item identical to or nested within the JSON data item to
which the query is applied to, expressed either by the value of that
data item or by providing a Normalized Path Expression as a JSONPath Output Path.

Normalized Path Expression:
cabo marked this conversation as resolved.
Show resolved Hide resolved
: A query in a normalized form that identifies exactly one Position in
an Argument; see {{overview}}.


## Inspired by XPath

Expand Down Expand Up @@ -272,7 +278,7 @@ $['store']['book'][0]['title']
for paths input to a JSONPath processor.
\[1]
Where a JSONPath processor uses JSONPath expressions as output paths,
these will always be converted to normalized JSONPath expressions
these will always be converted to Output Paths
which employ the more general *bracket–notation*.
\[2]
Bracket notation is more general than dot notation and can serve as a
Expand Down Expand Up @@ -785,7 +791,8 @@ as follows:
{: title="Default array slice start and end values"}

Slice expression parameters `start` and `end` are not directly usable
as slice bounds and must first be normalized. Normalization is defined as:
as slice bounds and must first be normalized.
Normalization for this purpose is defined as:

~~~~
FUNCTION Normalize(i):
Expand Down