** (MatchError) no match of right hand side value: {:error, %ExJSONPath.ParsingError{message: "syntax error before: '['"}}
lib/jsonpath.ex:7: Mix.Tasks.Execute.run/1
[ ] $[*]
Input:
["string", 42, {"key": "value"}, [0, 1]]
Expected output:
["string", 42, {"key": "value"}, [0, 1]]
Error:
** (MatchError) no match of right hand side value: {:error, %ExJSONPath.ParsingError{message: "syntax error before: '*'"}}
lib/jsonpath.ex:7: Mix.Tasks.Execute.run/1
[ ] $.key-dash
Input:
{"key-dash": "value"}
Expected output:
["value"]
Error:
** (MatchError) no match of right hand side value: {:error, %ExJSONPath.ParsingError{message: "illegal characters \"-d\""}}
lib/jsonpath.ex:7: Mix.Tasks.Execute.run/1
[ ] $.屬性
Input:
{"\u5c6c\u6027": "value"}
Expected output:
["value"]
Error:
** (MatchError) no match of right hand side value: {:error, %ExJSONPath.ParsingError{message: "illegal characters \"屬\""}}
lib/jsonpath.ex:7: Mix.Tasks.Execute.run/1
** (MatchError) no match of right hand side value: {:error, %ExJSONPath.ParsingError{message: "syntax error before: '*'"}}
lib/jsonpath.ex:7: Mix.Tasks.Execute.run/1
** (MatchError) no match of right hand side value: {:error, %ExJSONPath.ParsingError{message: "syntax error before: "}}
lib/jsonpath.ex:7: Mix.Tasks.Execute.run/1
The following queries provide results that do not match those of other implementations of JSONPath (compare https://cburgmer.github.io/json-path-comparison/):
[x]
$[1:3]
Input:Expected output:
Error:
[x]
$[0:0]
Input:Expected output:
Actual output:
[ ]
$[-4:]
Input:Expected output:
Actual output:
[x]
$..[0]
Input:Expected output (in any order as no consensus on ordering exists):
Error:
[ ]
$[*]
Input:Expected output:
Error:
[ ]
$.key-dash
Input:Expected output:
Error:
[ ]
$.屬性
Input:Expected output:
Error:
[ ]
$.2
Input:Expected output:
Actual output:
[ ]
$..*
Input:Expected output (in any order as no consensus on ordering exists):
Error:
[x]
$
Input:Expected output:
Error:
For reference, the output was generated by the program in https://github.com/cburgmer/json-path-comparison/tree/master/implementations/Elixir_ExJsonPath.