从响应中获取带连字符的 json 值

Get json value with hyphen from response

我已经看到了 note about quoting json fields with hyphens,但是如果它有连字符,我们如何从响应中访问 json?

响应与

一致
{ cancel-account: "Please don't do it!" }

这应该有效,

* def response = { cancel-account: "Please don't do it!" }
* def cancelAccount = response['cancel-account']
* print cancelAccount