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

Jsonpath: support && and || #33

Open
Amerousful opened this issue Jul 20, 2021 · 2 comments
Open

Jsonpath: support && and || #33

Amerousful opened this issue Jul 20, 2021 · 2 comments

Comments

@Amerousful
Copy link

I am faced with the fact that some operations are not currently supported in JsonPath.
I have query like this:

$.[?(@.id=='1' && @.name == 'Pasha')]

I see that this project has not been updated for a long time... Do you have any plans to support this project?

@jrudolph
Copy link
Owner

I'm not planning any new development myself right now but I'm fine with releasing new versions if there are contributions to be released.

This feature should be relatively easy to add, so I'd be happy to look at a PR and release a new version when needed.

@jrudolph
Copy link
Owner

You would need to introduce new classes

case class And(p1: Predicate, p2: Predicate) extends Predicate
// same for or

in JsonPath.scala, then add a parser for that in JsonPathParser.scala, and an implementation/conversion in JsonPathIntegration.scala.

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

No branches or pull requests

2 participants