JMeter BeanShell脚本中获取JSON对象中的数据出现异常

如图示,将响应的数据转换成JSON对象后,获取json键值对中的数据的时候就出现报错

错误显示:

2021-04-14 17:42:53,041 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval	Sourced file: inline evaluation of: ``import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject;  Strin . . . '' : Typed variable declaration : Class: JSONArray not found in namespace
 

试试所有包...

import com.alibaba.fastjson.*;