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

Added match expander that allows to match nullable @json@ objects #173

Merged
merged 4 commits into from
Aug 15, 2019

Conversation

norberttech
Copy link
Member

@norberttech norberttech commented Aug 15, 2019

This is continuation of #101 originally created by @partikus that introduce extremely flexible match expander. It also closes #133

All examples will return true:

(new MatcherFactory())->match(
  '{"image":null}',
  '{"image":"@null@||@[email protected]({\"url\":\"@[email protected]()\"})"}'
);

(new MatcherFactory())->match(
  '{"image":{"url":"http://image.com"}}',
  '{"image":"@null@||@[email protected]({\"url\":\"@[email protected]()\"})"}'
);

(new MatcherFactory())->match(
  '{"image":{"url":"http://image.com"}}',
  '{"image":"@[email protected](optional(), match({\"url\":\"@[email protected]()\"}) )"}'
);

@norberttech norberttech mentioned this pull request Aug 15, 2019
@norberttech norberttech merged commit 97d08f8 into coduo:master Aug 15, 2019
@norberttech norberttech deleted the feature/match-expander branch August 15, 2019 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nullable subjson
2 participants