测试积点老人 发表于 2020-11-10 10:23:26

10 jmeter调用SerializerFeature.UseSingleQuotes 提示异常

jmeter调用SerializerFeature.UseSingleQuotes 提示异常部分代码
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'

bellas 发表于 2020-11-11 09:53:30

环境检查下配置

郭小贱 发表于 2020-11-11 10:12:23

参考这篇帖子看下 http://ask.testfan.cn/question/822 {:3_67:}

qqq911 发表于 2020-11-11 10:31:09

还是单引号和双引号的问题

海海豚 发表于 2020-11-11 11:51:54

https://bbs.csdn.net/topics/392441078 参考下

jingzizx 发表于 2020-11-11 15:24:51

对象不对
页: [1]
查看完整版本: 10 jmeter调用SerializerFeature.UseSingleQuotes 提示异常