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

Crash on jsonpath accesing null address #76

Open
gkorland opened this issue Oct 28, 2021 · 1 comment
Open

Crash on jsonpath accesing null address #76

gkorland opened this issue Oct 28, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@gkorland
Copy link
Contributor

The following path "$.store.book[?(@.authors[0:].lastName)]" crash due to Accessing address: (nil)

Example JSON:

{
    "store": {
        "book": [
            {
                "authors": [
                    {
                        "firstName": "Nigel",
                        "lastName": "Rees"
                    },
                    {
                        "firstName": "Evelyn",
                        "lastName": "Waugh"
                    }
                ],
                "title": "Sayings of the Century"
            },
            {
                "authors": [
                    {
                        "firstName": "Herman",
                        "lastName": "Melville"
                    },
                    {
                        "firstName": "Somebody",
                        "lastName": "Else"
                    }
                ],
                "title": "Moby Dick"
            }
        ]
    }
}
@MeirShpilraien
Copy link
Contributor

MeirShpilraien commented Oct 31, 2021

Failing because of:

if !self.selector_filter.is_term_empty() {
            unimplemented!("range syntax in filter");
        }

https://github.com/RedisJSON/jsonpath/blob/ddb3b2db3345b31a4251ad1fbfb0f75732f6e189/src/select/mod.rs#L828

@freestrings freestrings added the enhancement New feature or request label Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants