The following code parses correctly but does not work properly because the comparison is with an int and a float. What's odd is that a >= comparison does return something but just > does not.
$[?(@.confidence > 0)]
My theory is that this is due to the lexer in jsonpath-rw. the NUMBER token might at fault here in that it specifies only digits are allowed. I can't quite tell if this is designed for something else other than filter predicates.
def t_NUMBER(self, t):
r'-?\d+'
t.value = int(t.value)
return t
Note: I am filing this bug here as the filter functionality is the only thing affected by this that I know of.
$[?(@.confidence > 0.5)]
Exception: Parse error at 1:21 near token . (.)
The following code parses correctly but does not work properly because the comparison is with an int and a float. What's odd is that a >= comparison does return something but just > does not. $[?(@.confidence > 0)]
My theory is that this is due to the lexer in jsonpath-rw. the NUMBER token might at fault here in that it specifies only digits are allowed. I can't quite tell if this is designed for something else other than filter predicates.
Note: I am filing this bug here as the filter functionality is the only thing affected by this that I know of.