1
我需要从GET
请求中读取一个ID并使用POST
中的ID执行测试。我从GET检索id为数组从以下表达式形式:空手道API测试 - 从JSON数组转换为字符串
And def reqId = response.teams[*].resource[1].resourceRequestId
`["59aeb24be4b0b17227553d07"]`
我保存这个ID作为变量:
And def reqId = response.teams[*].resource[1].resourceRequestId
当我使用这在我POST
操作,我得到以下错误:
exception":"org.springframework.http.converter.HttpMessageNotReadableException","message":"Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY token\n
有没有一种方法可以让我执行JSON.stringify()等的值转换为字符串或方法来提取,并在更加故意使用请求
谢谢,它工作! – Saurabh