RFC Errata


Errata Search

 
Source of RFC  
Summary Table Full Records

Found 4 records.

Status: Verified (4)

RFC 9535, "JSONPath: Query Expressions for JSON", February 2024

Source of RFC: jsonpath (art)

Errata ID: 8343
Status: Verified
Type: Technical
Publication Format(s) : TEXT, PDF, HTML

Reported By: Vladimír Gorej
Date Reported: 2025-03-24
Verifier Name: Andy Newton
Date Verified: 2025-03-27

Section 2.4 says:

function-argument   = literal /
                      filter-query / ; (includes singular-query)
                      logical-expr /
                      function-expr

It should say:

function-argument   = logical-expr /
                      filter-query / ; (includes singular-query)
                      function-expr /
                      literal

Notes:

The ABNF grammars in RFC 9535 were designed to be directly usable with PEG (Parsing Expression Grammar) parsers.

However, PEG parsers will fail to parse $[?blt(1==1)] or $[?true(1)==0] with the grammar as given, as they employ prioritized choice, where the order matters.

In the order given, they will try to match the `literal` rule in `function-argument` with the input `1==1`, and find that the `1` indeed matches a `number`, completing the match for `function-argument` and preempting the other choices. The intended rest of the `function-argument`, `==1` does not match anything, and the rule fails.
By putting the more complex `logical-expr` first, the whole `1==1` matches, and the rule succeeds as intended.

Similary, the function name `true` matches as the literal `true` instead, and preempts parsing `true(1)` as the more complex `function-expr`. Putting the `literal` choice last prevents the preemptive match.

Errata ID: 8352
Status: Verified
Type: Technical
Publication Format(s) : TEXT, PDF, HTML

Reported By: Vladimír Gorej
Date Reported: 2025-03-24
Verifier Name: Andy Newton
Date Verified: 2025-03-27

Section 2.3.5.1 says:

comparable          = literal /
                      singular-query / ; singular query value
                      function-expr    ; ValueType

It should say:

comparable          = singular-query / ; singular query value
                      function-expr /  ; ValueType
                      literal

Notes:

The ABNF grammars in RFC 9535 were designed to be directly usable with PEG (Parsing Expression Grammar) parsers.

However, PEG parsers will fail to parse $[?blt(1==1)] or $[?true(1)==0] with the grammar as given, as they employ prioritized choice, where the order matters.

In the order given, they will try to match the `literal` rule in `function-argument` with the input `1==1`, and find that the `1` indeed matches a `number`, completing the match for `function-argument` and preempting the other choices. The intended rest of the `function-argument`, `==1` does not match anything, and the rule fails.
By putting the more complex `logical-expr` first, the whole `1==1` matches, and the rule succeeds as intended.

Similary, the function name `true` matches as the literal `true` instead, and preempts parsing `true(1)` as the more complex `function-expr`. Putting the `literal` choice last prevents the preemptive match.

Errata ID: 8353
Status: Verified
Type: Technical
Publication Format(s) : TEXT, PDF, HTML

Reported By: Vladimír Gorej
Date Reported: 2025-03-24
Verifier Name: Andy Newton
Date Verified: 2025-03-27

Appendix A says:

comparable          = literal /
                      singular-query / ; singular query value
                      function-expr    ; ValueType

It should say:

comparable          = singular-query / ; singular query value
                      function-expr /  ; ValueType
                      literal

Notes:

The ABNF grammars in RFC 9535 were designed to be directly usable with PEG (Parsing Expression Grammar) parsers.

However, PEG parsers will fail to parse $[?blt(1==1)] or $[?true(1)==0] with the grammar as given, as they employ prioritized choice, where the order matters.

In the order given, they will try to match the `literal` rule in `function-argument` with the input `1==1`, and find that the `1` indeed matches a `number`, completing the match for `function-argument` and preempting the other choices. The intended rest of the `function-argument`, `==1` does not match anything, and the rule fails.
By putting the more complex `logical-expr` first, the whole `1==1` matches, and the rule succeeds as intended.

Similary, the function name `true` matches as the literal `true` instead, and preempts parsing `true(1)` as the more complex `function-expr`. Putting the `literal` choice last prevents the preemptive match.

Errata ID: 8354
Status: Verified
Type: Technical
Publication Format(s) : TEXT, PDF, HTML

Reported By: Vladimír Gorej
Date Reported: 2025-03-24
Verifier Name: Andy Newton
Date Verified: 2025-03-27

Appendix A says:

function-argument   = literal /
                      filter-query / ; (includes singular-query)
                      logical-expr /
                      function-expr

It should say:

function-argument   = logical-expr /
                      filter-query / ; (includes singular-query)
                      function-expr /
                      literal

Notes:

The ABNF grammars in RFC 9535 were designed to be directly usable with PEG (Parsing Expression Grammar) parsers.

However, PEG parsers will fail to parse $[?blt(1==1)] or $[?true(1)==0] with the grammar as given, as they employ prioritized choice, where the order matters.

In the order given, they will try to match the `literal` rule in `function-argument` with the input `1==1`, and find that the `1` indeed matches a `number`, completing the match for `function-argument` and preempting the other choices. The intended rest of the `function-argument`, `==1` does not match anything, and the rule fails.
By putting the more complex `logical-expr` first, the whole `1==1` matches, and the rule succeeds as intended.

Similary, the function name `true` matches as the literal `true` instead, and preempts parsing `true(1)` as the more complex `function-expr`. Putting the `literal` choice last prevents the preemptive match.

Report New Errata



Advanced Search