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

Does the parser support exclamation character (!)? #79

Open
xiaoyanqu opened this issue Mar 2, 2020 · 1 comment
Open

Does the parser support exclamation character (!)? #79

xiaoyanqu opened this issue Mar 2, 2020 · 1 comment

Comments

@xiaoyanqu
Copy link

Hi there, thanks so much for provide this awesome tool, i.e. jsonpath.

I'm working on parsing a parameter like parse("abcdefg!abcdefg").find(json_object), which contains the '!' character in one of the keys of json objects, then I got:
raise JsonPathLexerError('Error on line %s, col %s: Unexpected character: %s ' % (t.lexer.lineno, t.lexpos - t.lexer.latest_newline, t.value[0])) jsonpath_ng.lexer.JsonPathLexerError: Error on line 1, col 29: Unexpected character: !

I was wondering is the exclamation character (!) currently supported by the parser? If so, can you please advise how shall I feed in?

Thanks!

@mjallday
Copy link

Similar question on the ? character.

$..routes[?(@.id==foo)].filters[0] results in "*** jsonpath_rw.lexer.JsonPathLexerError: Error on line 1, col 10: Unexpected character: ?"

This is a valid example according to https://goessner.net/articles/JsonPath/

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants