Skip to content

Can't use single quotes with Jackson, "in" predicate operator #275

Description

@johnflavin

The README says, in section Filter Operators

String literals must be enclosed by single or double quotes ([?(@.color == 'blue')] or [?(@.color == "blue")]).

When using a JacksonJsonProvider or JacksonJsonNodeJsonProvider, and when testing a predicate with the in operator, an InvalidJsonException is thrown.

I've uploaded a test class to a gist: https://gist.github.com/johnflavin/31aea6ac790f32cbbb528124eceeb4df. In it, I try out all the different json provider classes, with single and double quotes, in predicates using ?(@.foo == 'bar') and ?(@.foo in ['bar']). Everything works as expected, except for Jackson providers, single quotes, and in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions