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

[LR] JSON Service response cannot handle null values #2459

Open
ittaLaRedoute opened this issue Mar 23, 2023 · 0 comments
Open

[LR] JSON Service response cannot handle null values #2459

ittaLaRedoute opened this issue Mar 23, 2023 · 0 comments

Comments

@ittaLaRedoute
Copy link

For JSON service response, if we have a null value, Cerberus cannot find the element.
For example, if we have the following response:

{
  "status": "success",
  "data": null,
  "message": "Successfully! Record has been fetched."
}

Cerberus cannot get the value for $.data:
image
Currently, the only way to bypass this error is to find all elements $..data and it will return the value in an array:
image

Test case implemented for debug on online version: https://prod.cerberus-testing.com/TestCaseScript.jsp?test=ITTA&testcase=0004A

It works fine for number, string and true/false values.
Tested in Cerberus version 4.16 and 4.17

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

3 participants