-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The following queries provide results that do not match those of other implementations of JSONPath
(compare https://cburgmer.github.io/json-path-comparison/):
-
$.2
Input:{"a": "first", "2": "second", "b": "third"}Expected output:
["second"]Error:
init terminating in do_boot ({badmatch,{error,{1,ejsonpath_parse,syntax error before: 2}}}) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",{badmatch,{error,{1,ejsonpath_parse,["syntax error before: ",["2"]]}}}} -
$[-1:]
Input:["first", "second", "third"]Expected output:
["third"]Error:
init terminating in do_boot ({badmatch,{error,{1,ejsonpath_parse,syntax error before: ':'}}}) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",{badmatch,{error,{1,ejsonpath_parse,["syntax error before: ","':'"]}}}} -
$[:]
Input:["first", "second"]Expected output:
["first", "second"]Error:
init terminating in do_boot ({badmatch,{error,{1,ejsonpath_parse,syntax error before: ']'}}}) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",{badmatch,{error,{1,ejsonpath_parse,["syntax error before: ","']'"]}}}} -
$[1:3]
Input:["first", "second", "third", "forth", "fifth"]Expected output:
["second", "third"]Actual output:
["second", "third", "forth", "fifth"] -
$[0:3:2]
Input:["first", "second", "third", "forth", "fifth"]Expected output:
["first", "third"]Error:
init terminating in do_boot ({not_implemented,slice}) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",{not_implemented,slice}} -
$[::2]
Input:["first", "second", "third", "forth", "fifth"]Expected output:
["first", "third", "fifth"]Error:
init terminating in do_boot ({badmatch,{error,{1,ejsonpath_parse,syntax error before: ':'}}}) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",{badmatch,{error,{1,ejsonpath_parse,["syntax error before: ","':'"]}}}} -
$..key
Input:{"object": {"key": "value", "array": [{"key": "something"}, {"key": {"key": "russian dolls"}}]}, "key": "top"}Expected output:
["russian dolls", "something", "top", "value", {"key": "russian dolls"}]Error:
init terminating in do_boot (function_clause) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",function_clause} -
$
Input:{"key": "value", "another key": {"complex": ["a", 1]}}Expected output:
[{"another key": {"complex": ["a", 1]}, "key": "value"}]Error:
init terminating in do_boot ({badmatch,{error,{1,ejsonpath_parse,syntax error before: }}}) Crash dump is being written to: erl_crash.dump...done {"init terminating in do_boot",{badmatch,{error,{1,ejsonpath_parse,["syntax error before: ",[]]}}}}
For reference, the output was generated by the program in https://github.com/cburgmer/json-path-comparison/tree/master/implementations/Erlang_ejsonpath.
Metadata
Metadata
Assignees
Labels
No labels