乡村蜗牛 2021-04-14 17:50 采纳率: 0%
浏览 262

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
 
  • 写回答

1条回答 默认 最新

  • 猫夏i 2021-04-14 19:12
    关注

    试试所有包...

    import com.alibaba.fastjson.*;

    评论

报告相同问题?