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)

Not supported

Instance of 'ParserException': end of input expected (at 1:2)

Elixir (ExJsonPath)

[
  "third"
]

Elixir (jaxon)

[]

Elixir (warpath) ¹

null

Erlang (ejsonpath)

Not supported

syntax error before: 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"
]

JavaScript (jsonpathly)

[
  "third"
]

Java (com.github.jsurfer)

[
  "third"
]

Java (com.jayway.jsonpath) ¹ ³

Not found

SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders 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}")

Python (python-jsonpath)

Not supported

JSONPathSyntaxError("unexpected token '2'")

Raku (JSON-Path)

Not supported

JSON path parse error at position 1

Ruby (jsonpath)

[]

Rust (jsonpath)

[]

Rust (jsonpath_lib)

[]

Rust (jsonpath_plus)

[]

Rust (serde_json_path)

Not supported

at position 2, in dot member name, must start with lowercase alpha or '_'

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)

[]

Footnotes