Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve parse errors #58

Open
taimoorzaeem opened this issue Feb 20, 2025 · 0 comments
Open

Improve parse errors #58

taimoorzaeem opened this issue Feb 20, 2025 · 0 comments
Labels
enhancement New feature or request errors Related to error messages

Comments

@taimoorzaeem
Copy link
Owner

Parse errors are not super helpful and could be improved.

ghci> import Data.Aeson.JSONPath
ghci> import Data.Aeson.QQ.Simple (aesonQQ)
ghci> json = [aesonQQ| { "key": "value" } |]

ghci> query "$. key" json
Left "failed to parse query: $. key" (line 1, column 3):
unexpected " "
expecting letter or "*"

ghci> query "$.$key" json
Left "failed to parse query: $.$key" (line 1, column 3):
unexpected "$"
expecting letter or "*"
@taimoorzaeem taimoorzaeem added errors Related to error messages enhancement New feature or request labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request errors Related to error messages
Projects
None yet
Development

No branches or pull requests

1 participant