Syntax diagrams and corresponding Backus-Naur Form (BNF) syntax descriptions are presented for the basic SQL/JSON path expression syntax.
The basic syntax of SQL/JSON path expression is explained in Basic SQL/JSON Path Expression Syntax. This topic recapitulates that information in the form of syntax diagrams and BNF descriptions.
Figure B-1 json_basic_path_expression

Note:
The optional filter expression, json_filter_expr, can be present only when the path expression is used in SQL condition json_exists. Otherwise, a compile-time error is raised.
Figure B-2 json_absolute_simple_path_expression

Figure B-6 json_array_step

Note:
Array indexing is zero-based, so integer is a non-negative integer (0, 1, 2, 3,...).
The first integer of a range (integer to integer) must be less than the second.
The array elements must be specified by indexes in ascending order, without repetitions.
A compile-time error is raised if any of these syntax rules is violated.
Figure B-14 json_relative_simple_path-expr

Figure B-17 json_scalar

Note:
json_number is a JSON number: a decimal numeral, possibly signed and possibly including a decimal exponent.