Forum Discussion
rakesh133
7 years agoOccasional Contributor
Hi All,
Finally, I found a workaround for this issue. I passed the Json response to "def json = JsonOutput.toJson(response)" based on this stackoverflow question. Now the response is successfully parsed evenif the special characters are present
The Groovy code will be something like this.
import groovy.json.* def responseContent = testRunner.testCase.getTestStepByName("Name of the Test Step").getPropertyValue("response") def json = JsonOutput.toJson(responseContent) def result = new JsonSlurper().parseText(json)
log.info result
Lets see how it goes and I will update you.
Related Content
- 4 years ago
- 9 years ago
Recent Discussions
- 15 years ago