Skip to content

RFC 9535: Scalar array element comparison fails #4850

@fubar-coder

Description

@fubar-coder

What is the current bug behavior?

I encountered non-working JSON path queries:

$[?@ != '8f34e5ec-d698-4f17-a70a-28e944ee0075']

and

$[?(@ != '8f34e5ec-d698-4f17-a70a-28e944ee0075')]

Both should - according to RFC 9535 - work.

Steps to reproduce

This is the test document:

[
  "efba2bf3-e6e8-4a93-948e-7b83b3ddc375",
  "8f34e5ec-d698-4f17-a70a-28e944ee0075"
]

What is the expected correct behavior?

The correct behavior should be that the following capture should set the variable (item_id) to efba2bf3-e6e8-4a93-948e-7b83b3ddc375.

item_id: jsonpath "$[?(@ != '8f34e5ec-d698-4f17-a70a-28e944ee0075')]" first

According to RFC 9535, this should work, as can be seen in the BNF "comparable" -> "singular-query" -> "rel-singular-query" -> "current-node-identifier"

The "singular-query-segments" has an asterisk around its whole definition, which means that "singular-query-segments" is effectively optional.

Execution context

I use the docker image (Linux).

  • Hurl Version (hurl --version):

Probably 7.1.0, as I use the image tagged "latest".

Possible fixes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions