B Diagrams for Basic SQL/JSON Path Expression Syntax

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

Description of Figure B-1 follows
Description of "Figure B-1 json_basic_path_expression"


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

Description of Figure B-2 follows
Description of "Figure B-2 json_absolute_simple_path_expression"

Figure B-6 json_array_step

Description of Figure B-6 follows
Description of "Figure B-6 json_array_step"


  • 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-7 json_function_step

Description of Figure B-7 follows
Description of "Figure B-7 json_function_step"

Figure B-11 json_conjunction

Description of Figure B-11 follows
Description of "Figure B-11 json_conjunction"

Figure B-14 json_relative_simple_path-expr

Description of Figure B-14 follows
Description of "Figure B-14 json_relative_simple_path-expr"

Figure B-15 json_compare_pred

Description of Figure B-15 follows
Description of "Figure B-15 json_compare_pred"

Figure B-17 json_scalar

Description of Figure B-17 follows
Description of "Figure B-17 json_scalar"


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