If you i understood you correctly ? What do you mean by Null ? How does a JSON value come as Null ?, my back end is java, where null is primitive. Please ping me if you want more details on my scenario.

it looks like when a jsonPath expression returns null, it actually fails the assertion. This is probably by design.

Knowing this, this is how you would accomplish what you are wanting to do.

When you get to the logic that is populating the 'image' variable, place that logic in an at least, so if the thumbnailImageUrl jsonpath fails, it'll execute line #8, which sets that value to null, if it doesn't fail, then whatever non Null value will populate the image variable.

Thanks for the information, it is like try/catch.. This is okie to go with one or two keys in the json, but my JSON Contains 100+ keys, how can add a try catch for all the keys. Could you please give some inputs on this.

You could run a regex against the original response replacing all 'null' values with Null|NULL first, then the xpaths will work accordingly? If the client needs it to be 'null', then after you build your response for the client, just run another regex to pull all 'Null' values back to 'null' ....

this is slightly messy, but should get you what you're looking for...

just a word of caution, with 100 variables in a policy, try to avoid duplicating variables. leverage the jsonPath's outputted variable as much as possible, otherwise you could quickly end up with 200+ variables being defined during one policy execution, which will cause unnecessary load on the appliance.