Skip to content

filter.Expresson.find() does not handle 'None' values correctly #153

Open
@code-inflation

Description

@code-inflation

find() doesn't seem to be able to handle None values.

Example:

from jsonpath_ng.ext.parser import parse

data = [{"test": True}, {"test": None}]

query = $[?(test == true)]
parser = parse(query)
parser.find(data)

Causes the following error:

TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions