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

add isNull predicate #163

Closed
lepapareil opened this issue Feb 12, 2021 · 2 comments
Closed

add isNull predicate #163

lepapareil opened this issue Feb 12, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@lepapareil
Copy link
Collaborator

An api returns a json empty field with null data type, it would be helpful if i could test it with a simple isNull predicate:

GET https://my_api.com

[Asserts]
jsonpath "$.empty" isNull

what do you think about it ?

@lepapareil lepapareil added the enhancement New feature or request label Feb 12, 2021
@fabricereix
Copy link
Collaborator

Yes, you can add this kind of shortcuts
isNull for equals null

similarly, we thought about adding
true for equals true

@lepapareil lepapareil added this to the 1.3.0 milestone Feb 23, 2021
@fabricereix fabricereix removed the 1.3.0 label Jun 16, 2021
@fabricereix
Copy link
Collaborator

Finally, we are going to add operators such as '==' for equality (#171)
Using shortcut predicates such as isNull or true won't be really useful anymorel

[Asserts]
jsonpath "$.empty" == null
jsonpath "$.status" == true

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

2 participants