How to write the code about this validation fragment in the figure

1 Like

you just click on the snippet and it will generate the code for you. that’s why is named snippet :wink:

1 Like

But the code fragment that validates is not empty is not there:neutral_face:

1 Like

I don’t understand what are you trying to do.
Can you post some screenshots with your setup?

1 Like

I want to verify that the parameter value of the interface response is not null.
But there are no examples of non-null validation in these code snippets.

1 Like

now i get it.
well, if the key is present in the response (but it may have a null value), you can use the JSON value check
if the key may be missing, you have to parse the json into a map and check for the key presence

can you post also a sample response? if itmay contain sensitive data you can edit it , we are mostly interrested in the structure with key names and types.

LE: a better aproach will be to use json schema validation, just do a search on the forum and you will find some nice topics regardings this

1 Like

For example, in the return field of an interface
image
I want to determine which keywords are needed to determine if “data” is not null
image