Function sum

Setup

Selector: $.data.sum()

{"data": [1,2,3,4]}

Results

Consensus

Not supported

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

[]

Clojure (json-path) ¹

null

Elixir (jaxon)

[]

Golang (github.com-oliveagle-jsonpath) ¹

[]

Golang (github.com-spyzhov-ajson)

[]

JavaScript (Goessner) ²

Not found

jsonpath returned false, this might indicate an error

JavaScript (jsonpath-plus)

[]

Java (com.jayway.jsonpath) ¹ ³

10.0

Kotlin (com.nfeld.jsonpathkt) ¹

null

Objective-C (SMJJSONPath) ¹ ³

10

PHP (Goessner) ²

Not found

jsonpath returned false, this might indicate an error

PHP (galbar-jsonpath) ²

Not found

jsonpath returned false, this might indicate an error

Perl (JSON-Path)

[]

Python (jsonpath) ²

Not found

jsonpath returned false, this might indicate an error

Ruby (jsonpath)

[]

Rust (jsonpath_lib)

[]

Swift (Sextant)

[
  10
]

dotNET (JsonPathLib)

[]

Errors

Golang (github.com-bhmj-jsonslice) ¹ ³

path: unknown function at 10

PHP (remorhaz-jsonpath)

Error: 'Failed to execute JSONPath query: $.data.sum()

$var2 = $matcherFactory->matchPropertyStrictly('data');
$var3 = $valueListFetcher->fetchChildren($input, $var2);
$var4 = $evaluator->aggregate('sum', $var3);
return $var4;'

Rust (jsonpath_plus)

Error Parsing JSON Path:
$.data.sum()
panic occurred

Footnotes