Dot notation with number

Setup

Selector: $.2

["first", "second", "third", "forth", "fifth"]

Results

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

[]

Clojure (json-path) ¹

null

Cpp (jsoncons)

[
  "third"
]

Dart (json_path)

[]

Elixir (ExJsonPath)

[
  "third"
]

Elixir (jaxon)

[]

Elixir (warpath) ¹

null

Erlang (ejsonpath)

Not supported

syntax error before: 2

Golang (github.com-AsaiYusuke-jsonpath) ²

Not found

type unmatched (expected=object, found=[]interface {}, path=.2)

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $.2	:1:2 - 1:4 unexpected Float while scanning operator

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

"third"

Golang (github.com-ohler55-ojg)

[]

Golang (github.com-oliveagle-jsonpath) ¹

[]

Golang (github.com-spyzhov-ajson)

[
  "third"
]

Golang (github.com-vmware-labs-yaml-jsonpath)

[]

Haskell (jsonpath)

[]

JavaScript (Goessner) ²

[
  "third"
]

JavaScript (brunerd)

Not supported

JavaScript (jsonpath)

[
  "third"
]

JavaScript (jsonpath-plus)

[
  "third"
]

Java (com.github.jsurfer)

[
  "third"
]

Java (com.jayway.jsonpath) ¹ ³

Not found

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
com.jayway.jsonpath.PathNotFoundException: Expected to find an object with property ['2'] in path $ but found 'net.minidev.json.JSONArray'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.

Kotlin (com.nfeld.jsonpathkt) ¹

null

Objective-C (SMJJSONPath) ¹ ³

Not found

Expected to find an object with property ['2'] in path $ but found 'GSArray'. This is not a json object.

PHP (Goessner) ²

[
  "third"
]

PHP (galbar-jsonpath) ²

[
  "third"
]

PHP (remorhaz-jsonpath)

[]

PHP (softcreatr-jsonpath)

[
  "third"
]

Perl (JSON-Path)

[
  "third"
]

Python (jsonpath) ²

[
  "third"
]

Python (jsonpath-ng)

Not supported

JsonPathParserError('Parse error at 1:2 near token 2 (NUMBER)')

Python (jsonpath-rw)

Not supported

Exception('Parse error at 1:2 near token 2 (NUMBER)')

Python (jsonpath2)

Not supported

line 1:2 mismatched input '2' expecting {'*', ID}
ValueError("line 1:2 mismatched input '2' expecting {'*', ID}")

Raku (JSON-Path)

Not supported

JSON path parse error at position 1

Ruby (jsonpath)

[]

Rust (jsonpath)

[]

Rust (jsonpath_lib)

[]

Rust (jsonpath_plus)

[]

Scala (jsonpath)

[]

Swift (Sextant)

[]

dotNET (Json.NET)

[]

dotNET (JsonCons.JsonPath)

[]

dotNET (JsonPath.Net)

Not supported

Could not find any valid selectors.

dotNET (JsonPathLib)

[
  "third"
]

dotNET (Manatee.Json)

[]

JSON (Path_Reference_Implementation)

[]

Proposal (A)

[]

Footnotes