Compiled JsonPath containing an aggregation function with [*] notation cannot be reused · Issue #1038 · json-path/JsonPath · GitHub
More Web Proxy on the site http://driver.im/
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
The first evaluation is successful but the second fails:
Exception in thread "main" com.jayway.jsonpath.JsonPathException: Aggregation function attempted to calculate value using empty array
at com.jayway.jsonpath.internal.function.numeric.AbstractAggregation.invoke(AbstractAggregation.java:59)
at com.jayway.jsonpath.internal.path.FunctionPathToken.evaluate(FunctionPathToken.java:41)
at com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:66)
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:179)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:393)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:377)
The issue affects 2.8.0 and 2.9.0 and it seems it was introduced with a60e96d.
There is a workaround to use max($.dataset..value) json path instead but it is not really nice and cannot work if the field being aggregated exists at different levels in the input data. The [*] notation should also work as it did in 2.7.0.
The text was updated successfully, but these errors were encountered:
The first evaluation is successful but the second fails:
The issue affects 2.8.0 and 2.9.0 and it seems it was introduced with a60e96d.
There is a workaround to use
max($.dataset..value)
json path instead but it is not really nice and cannot work if the field being aggregated exists at different levels in the input data. The[*]
notation should also work as it did in 2.7.0.The text was updated successfully, but these errors were encountered: