jmespath.js icon indicating copy to clipboard operation
jmespath.js copied to clipboard

Bug with dashses in unquoted strings

Open GrahamCampbell opened this issue 5 years ago • 2 comments

The following query:

data.relationships.flow-actions.data[].id

is invalid syntax according to the specification, because dashes are not allowed in unquoted strings, however this library allows it. I guess we are missing a spec compliance test that asserts there's a parse error. FYI, the PHP implementation is correct, and rejects that input.

The origin of this report is https://github.com/jmespath/jmespath.php/issues/57#issuecomment-571821595.

GrahamCampbell avatar Jul 14 '20 22:07 GrahamCampbell

It seems like this is fixed in 0.15.0, but https://jmespath.org/ is using 0.14.0. This just needs to be fixed in https://github.com/jmespath/jmespath.site

bespokebob avatar Feb 17 '21 16:02 bespokebob

@youngbob For the record, JMESPath Community site uses the latest version of the JavaScript implementation.

The corresponding pull request has also been accepted recently on the official site. Unfortunately, it has yet to be deployed to take effect.

springcomp avatar Aug 09 '22 11:08 springcomp