Suppress null element in JSON response

Not applicable

Hi ,

We need to suppress null element coming in JSON response. Currently we are doing it using XSLT before converting the XML to JSON. We would like to know if there is option available to suppress empty element in JSON response

0 4 765
4 REPLIES 4

Former Community Member
Not applicable

You can use the JavaScript policy, traverse the JSON and delete null/empty values.

Not applicable

Thankyou I will try with JavaScript policy.I thought there is option available in xmlTojson policy to suppress empty element.

I guess you can user <Options><RecognizeNull> and <Options><NullValue> properties to suppress that

or use "format" xml.com"format"