Subject: [Jsonpath] [jsonpath] Comment on current draft: normalized path

From: Daniel P <[email-masked]>
Date: Wed, 3 Mar 2021 22:35:24 -0500

The draft says, in section 1.3,

"Where a JSONPath processor uses JSONPath expressions as output paths,
these will always be converted to normalized JSONPath expressions
which employ the more general bracket-notation. [2] Bracket notation
is more general than dot notation and can serve as a canonical form
when a JSONPath processor uses JSONPath expressions as output paths."

The definition of normalized path expression should be in terms of
symbols defined in the grammar. Intuitively what we want is a path in
the bracket notation with only non-negative indices and single quoted
names allowed. But the grammar doesn't define bracket notation, it
defines union and union-element.  It seems to me it would be awkward
to define normalized JSONPath expressions in terms of degenerate
unions. Would it make sense to introduce a separate non-union bracket
expression into the grammar to make it easier to express things like
normalized path expressions precisely?

Daniel