ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
Java Json解释 pom.xml: ``` <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version> </dependency> ``` 主体使用: ``` import com.alibaba.fastjson.*; String json = "{\"price\":811,\"num\":18011}"; JSONObject jsonObject = JSONObject.parseObject(json); System.out.println("num: "+jsonObject.getString("num")); System.out.println("price: "+jsonObject.getString("price")); System.out.println("jsonObject: "+jsonObject); ```