Skip to content

wrap: false does not correctly return some cases #98

Closed
@cburgmer

Description

@cburgmer

The following queries provide results that do not match those of other implementations of JSONPath
(compare https://github.com/cburgmer/json-path-comparison/tree/master/comparison):

  • $[-1:]
    Input:

    ["first", "second", "third"]
    

    Expected output:

    ["third"]
    

    Actual output:

    "third"
    
  • $[0:1]
    Input:

    ["first", "second"]
    

    Expected output:

    ["first"]
    

    Actual output:

    "first"
    
  • $.key
    Input:

    {"key": ["first", "second"]}
    

    Expected output:

    ["first", "second"]
    

    Actual output:

    [["first", "second"]]
    

For reference, the output was generated by the program in https://github.com/cburgmer/json-path-comparison/tree/master/implementations/JavaScript_jsonpath-plus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions