测试积点老人 发表于 2019-6-11 17:21:47

jmeter调用SerializerFeature.UseSingleQuotes 提示异常

请大神帮忙看看怎么回事,代码我在eclipse调试是可以运行的

部分代码
                        JSONObject outParam1 = new JSONObject();
String danjsonString =null;
String jsonString = JSONObject.toJSONString(arrayList);//双引号
danjsonString = JSONObject.toJSONString(arrayList,SerializerFeature.UseSingleQuotes);//单引号


异常:
Response message: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: `` import java.util.ArrayList; import java.util.HashMap; import java.util.List; im . . . '' : Error in method invocation: Method toJSONString( java.util.ArrayList, com.alibaba.fastjson.serializer.SerializerFeature ) not found in class'com.alibaba.fastjson.JSONObject'

qqq911 发表于 2019-6-12 10:41:20

学习

jingzizx 发表于 2019-6-12 12:01:20

看看是不是包不一样
页: [1]
查看完整版本: jmeter调用SerializerFeature.UseSingleQuotes 提示异常