<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.21</version>
</dependency>
这样写的maven 但是getString parseObject很多方法用不了 是为什么啊
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.21</version>
</dependency>
这样写的maven 但是getString parseObject很多方法用不了 是为什么啊

666666666666666
具体什么方法用不了,错误是什么
美味的曲奇 发表于 2022-12-28 18:47
具体什么方法用不了,错误是什么
getString方法用不了
public static void main(String[] args) throws IOException {
httpApi api = new httpApi();
String run = api.run("xxx");
JSONObject jsonObject = (JSONObject) JSON.parse(run);
String content = JSON.getString("content");
System.out.println(content);
}
java: 找不到符号
符号: 方法 getString()
位置: 类型为org.json.simple.JSONObject的变量 js