Forum Discussion

rakesh133's avatar
rakesh133
Occasional Contributor
8 years ago

JsonSlurplerGetting Error while Parsing the Json Response

I tried to create a groovy script to parse the JSON response to a variable using JsonSlurper. Though the response Json is in valid format, i am getting an error

 

def responseContent = testRunner.testCase.testSteps["Neme fof the test step"].testRequest.response.contentAsString
def Response = new JsonSlurper().parseText(responseContent)
log.info Code

 

Could some one please look into this issue provide me a workaround for this. Thanks in advance