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”,
“config”: {
“status”: 500,
“reason”: “Error”,
“headers”: {
“Content-Type”: [ “text/html” ]
“entity”: “

Epic #FAIL