Converting \" into " is the default JSON behavior.
Do you have some more API Properties like
x-ibm-gateway-framework-preserve-escaped-reverse-solidusHow did you find out, that APIC changes the response message?
To escape \ you could work with \\
To escape \n you could work with \\n
You may have to do some try and error
------------------------------
Matthias Jungbauer
------------------------------
Original Message:
Sent: Mon November 23, 2020 05:36 AM
From: Shweta Revankar
Subject: Escape \ in incoming JSON body
Backend is returning error response with \" as shown below -
{ "error" : "400 \"Bad \n Request\""}
And when APIC is reading this response it is removing the slash (\) and then sending it to consumers like below -
{ "error" : "400 "Bad
Request""}
How can we retain escape characters (\ or \n) while reading the response?
NOTE: We already have this property added for the API to escape the Unicode : x-ibm-gateway-api-json-parse-error-handling = escape-unicode.
Thanks & Regards,
Shweta
------------------------------
Shweta Revankar
------------------------------