Closed hiltontj closed 1 year ago
This issue is being closed, as although #32 does not make the error system perfect, it definitely changes the context here. Going forward, I will likely create a new issue, or drum up an issue template for submitting parser problems, and cases where error messages could be improved.
Currently, the error handling and messaging around improperly formatted query strings is not going much further than the standard error capabilities of
nom
. This leads malformed query strings to produce error messages that are helpful, but need more context and clarity to make for a better user experience.This is a tracking issue to discuss where the error handling needs improvements. If you are using
serde_json_path
and find any good examples, please share them here, like so:JSON Path:
JSON:
Error:
Comment:
The error here is because the string literal selector is missing an ending quote (
'
), but the parser fails saying we missed a?
. Furthermore, rolling up contextual errors at every level of the parsing tree does not add value here.If you want a convenient place to test out queries and generate examples, try the serde_json_path sandbox