WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Results do not match other implementations #7

@cburgmer

Description

@cburgmer

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"]
    

    Actual output:

    []
    
  • $[?(@.key<42)]
    Input:

    [{"key": 0}, {"key": 42}, {"key": -1}, {"key": 41}, {"key": 43}, {"key": 42.0001}, {"key": 41.9999}, {"key": 100}, {"some": "value"}]
    

    Expected output:

    [{"key": 0}, {"key": -1}, {"key": 41}, {"key": 41.9999}]
    

    Actual output:

    [{"key": 0}, {"key": -1}, {"key": 41}, {"key": 41.9999}, {"some": "value"}]
    
  • $[?(@.key)]
    Input:

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

    Expected output:

    [{"key": "value"}]
    

    Error:

    String 'value' was not recognized as a valid Boolean.
    
  • $['two.some']
    Input:

    {"one": {"key": "value"}, "two": {"some": "more", "key": "other value"}, "two.some": "42"}
    

    Expected output:

    ["42"]
    

    Actual output:

    ["more"]
    

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions