jirutka/rsql-parser

Escaped double quote produces RSQLParserException

michaelzingg opened this issue · 3 comments

The documentation states, that it should be possible to use escaped double quotes in a quoted argument, but if I am using name=="\"" as query string, I am getting a RSQLParserException with the following message:
cz.jirutka.rsql.parser.TokenMgrError: Lexical error at line 1, column 31. Encountered: <EOF> after : ""

When I send your string to the parser via a Java string, e.g.,
" name==\"\\\"\" "
it works. Perhaps you're sending the query in through an external method and the backslash is getting lost? Or the quotes are getting URL-escaped (double quote = %22)? I'd set a breakpoint in your Java code just before the query goes to RSQLParser.parse() and see what the string looks like.

It happened to me as well. It is fixed in version 2.1.0. Update your pom file.

I just figured that out myself and came back to close the issue. The problem was indeed that i was including rsql-parser 2.0.0 through rsql-jpa 2.0.2.
Thanks for the support!