Error尝试通过解析 JSON 来提取响应属性,收到 NoSuchProperty 错误
import groovy.json.JsonSlurper
def response = messageExchange.response.responseContext
def json1 = new JsonSlurper().parseText(response)
log.info json1.results[0].id
最佳答案
看起来像是打字错误。尝试:
def response = messageExchange.response.responseContent
关于testing - Groovy 脚本错误 : No such property while parsing the json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57513782/