Json response in identity gateway

Hi Experts,
How can I send JSON response in the body/entity, if you look at the below sample they cited it in html but I need to have it in json format Pls help with it.I tried with some JSON in it but not working pls advice. thanks

{
“name”: “ErrorHandler”,
“type”:“StaticResponseHandler”,
“config”: {
“status”: 500,
“reason”: “Error”,
“headers”: {
“Content-Type”: [ “text/html” ]
},
“entity”: “

Epic #FAIL


}
}

Hi yeramsh,

I wanted to reach out and see if you are still experiencing issues with sending your response in JSON format.

Without knowing the details of your use case, the JSON example provided from our IG Docs indicates that you may want to create a custom error page/response in IG.

The following KB article provides additional examples in JSON format using the StaticResponseHandler.

I hope this helps.

Thank you,
Sheila

Thanks Sheila.