Karate 如何解析这个json字符串响应

Karate 如何解析这个json字符串响应,karate,Karate,我有一个websocket响应,如下所示 a["{\"type\":\"1ffe4b5d___AC_GET_MY_AVAILABLE_TASKS___N\"}"] 有谁能告诉我如何解析它吗?完全由您决定,如果需要,可以使用字符串操纵或使用自定义Java代码,我只能给您一个提示: * def response = 'a["{\"type\":\"1ffe4b5d___AC_GET_MY_AVAIL

我有一个websocket响应,如下所示

a["{\"type\":\"1ffe4b5d___AC_GET_MY_AVAILABLE_TASKS___N\"}"]

有谁能告诉我如何解析它吗?

完全由您决定,如果需要,可以使用字符串操纵或使用自定义Java代码,我只能给您一个提示:

* def response = 'a["{\"type\":\"1ffe4b5d___AC_GET_MY_AVAILABLE_TASKS___N\"}"]'
* json temp = response.substring(1)

还可以查看类型转换:

完全由您决定,如果需要,可以使用字符串操作或使用自定义Java代码,我只能给您一个提示:

* def response = 'a["{\"type\":\"1ffe4b5d___AC_GET_MY_AVAILABLE_TASKS___N\"}"]'
* json temp = response.substring(1)
另请参见类型转换: