akshaymankar / jsonpath-hs

Haskell implementation of JSONPath
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Parsing of exists expressions in filters is too permissive #42

Open glyn opened 1 year ago

glyn commented 1 year ago

Currently, the following path $[?@$.foo] parses ok due to the use of jsonPath (which can start with $) in:

filterQuery endParser =
  FilterQuery <$> beginningPoint <*> jsonPath endParser

I would like to add an error test for this case before fixing the bug. See https://github.com/akshaymankar/jsonpath-hs/issues/40.