Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results do not match other implementations #17

Open
6 tasks
cburgmer opened this issue Jul 22, 2019 · 1 comment
Open
6 tasks

Results do not match other implementations #17

cburgmer opened this issue Jul 22, 2019 · 1 comment

Comments

@cburgmer
Copy link

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

  • $[-1:]
    Input:

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

    Expected output:

    ["third"]
    

    Error:

    parsing error
    
  • $[:]
    Input:

    ["first", "second"]
    

    Expected output:

    ["first", "second"]
    

    Error:

    parsing error
    
  • $[1:3]
    Input:

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

    Expected output:

    ["second", "third"]
    

    Actual output:

    ["second", "third", "forth"]
    
  • $[0:1]
    Input:

    ["first", "second"]
    

    Expected output:

    ["first"]
    

    Actual output:

    ["first", "second"]
    
  • $[?(@.key)]
    Input:

    [{"some": "some value"}, {"key": "value"}]
    

    Expected output:

    [{"key": "value"}]
    

    Error:

    parsing error
    
  • $.*
    Input:

    {"some": "string", "int": 42, "object": {"key": "value"}, "array": [0, 1]}
    

    Expected output:

    ["string", 42, {"key": "value"}, [0, 1]]
    

    Actual output:

    [[0, 1], 42, {"key": "value"}, "string"]
    

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

@cburgmer
Copy link
Author

Hope this helps. There is more in the comparison, but you explicitly called out that not all features are currently supported, so I removed failing comparisons connected to those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant