Open q2w opened 8 months ago
@kallestenflo
Test Scenario:
Json: {}
Path: $.concat("Bob", $.concat(" Joe", " Alex"))
Before this change, this would result in the below error. Here the internal concat
is not interpreted rightly because of this bug.
Arguments to function: 'concat' are not closed properly.
com.jayway.jsonpath.InvalidPathException: Arguments to function: 'concat' are not closed properly.
@kallestenflo
Currently a function with parameter which have parentheses is wrongly parsed. As soon as a closing parentheses is encountered, the parsing logic assumes end state for the function parameter. For example, given
concat(sum(), 10)
thensum(
is treated as first parameter. This is wrong parsing logic.A parameter should be treated completely parsed only when a
,
or, the last)
is encountered ( that is groupParen == 0)