I am validating a Web Service Request, that returns French characters (é, à, è) in the response. But facing below error, while trying to parse the Json response.
Sample Json Response :
“data”: {
“name”: “Rapidtransfer SA”,
“id”: “Société anonyme”,
}
Sample Code :
ResponseObject getEntityResponse = WS.sendRequestAndVerify(findTestObject('roles_web_request'))
JsonSlurper slurper = new JsonSlurper()
Map resultData = slurper.parseText(getEntityResponse.getResponseBodyContent())
String result = resultData.get("id")
Error
Endpoint Execution roles_web_request FAILED.
Reason:
groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
The current character read is ' ' with an int value of 65279
Unable to determine the current character, it is not a string, number, array, or object
Kindly let me know, how to parse Json responses having French characters using Katalon.