Example
Response Coming as XML
Converted JSON Response
Explanation
This script performs the following operations:- XML Cleaning:
<?...?>lines in XML are cleaned - XML Parse: XML data is parsed
- JSON Conversion: XML structure is converted to JSON format
- Unicode Normalization: Unicode escape sequences (including Turkish characters in \uXXXX format) are converted to readable characters
- Error Management: Returns error message in JSON format in case of error
This script should be run on the response line (Response Policy) because it uses the
responseBodyTextFromTargetAPI and responseBodyTextToClient variables.
