You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed that the ?(@ empty false) expression is not working with the latest json-path version. I have tried this with a simple java program with versions 2.4.0 to 2.7.0. Seems like this is broken from 2.5.0 upwards.
Exception in thread "main" java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class java.util.Collection (java.util.LinkedHashMap and java.util.Collection are in module java.base of loader 'bootstrap')
at com.jayway.jsonpath.internal.filter.ValueNodes$JsonNode.isEmpty(ValueNodes.java:177)
at com.jayway.jsonpath.internal.filter.EvaluatorFactory$EmptyEvaluator.evaluate(EvaluatorFactory.java:167)
at com.jayway.jsonpath.internal.filter.RelationalExpressionNode.apply(RelationalExpressionNode.java:44)
at com.jayway.jsonpath.internal.filter.FilterCompiler$CompiledFilter.apply(FilterCompiler.java:415)
at com.jayway.jsonpath.internal.path.PredicatePathToken.accept(PredicatePathToken.java:77)
at com.jayway.jsonpath.internal.path.PredicatePathToken.evaluate(PredicatePathToken.java:47)
at com.jayway.jsonpath.internal.path.PathToken.handleArrayIndex(PathToken.java:134)
at com.jayway.jsonpath.internal.path.WildcardPathToken.evaluate(WildcardPathToken.java:42)
at com.jayway.jsonpath.internal.path.PathToken.handleObjectProperty(PathToken.java:81)
at com.jayway.jsonpath.internal.path.PropertyPathToken.evaluate(PropertyPathToken.java:79)
at com.jayway.jsonpath.internal.path.ScanPathToken.walkObject(ScanPathToken.java:76)
at com.jayway.jsonpath.internal.path.ScanPathToken.walk(ScanPathToken.java:41)
at com.jayway.jsonpath.internal.path.ScanPathToken.walkObject(ScanPathToken.java:84)
at com.jayway.jsonpath.internal.path.ScanPathToken.walk(ScanPathToken.java:41)
at com.jayway.jsonpath.internal.path.ScanPathToken.evaluate(ScanPathToken.java:36)
at com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:62)
at com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:99)
at com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:107)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:183)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:341)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:325)
at org.example.Main.main(Main.java:42)
The text was updated successfully, but these errors were encountered:
Hello,
We noticed that the
?(@ empty false)
expression is not working with the latest json-path version. I have tried this with a simple java program with versions 2.4.0 to 2.7.0. Seems like this is broken from 2.5.0 upwards.Below is the sample java program,
The following exception is thrown,
The text was updated successfully, but these errors were encountered: