![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
json
qq_35577329
我有故事,你有酒吗?
展开
-
Json字符串转JsonObject例子
1、GsonGson是Google发布的一个开源Java类库,能够很方便的在Java对象和JSON字符串之间进行序列化和反序列化。 com.google.code.gson gson 2.2.2 代码实现//Json字符串转Json对象JsonObject departmentJsonObj = new JsonParser().parse(allDepartmentSt...原创 2018-12-28 13:53:03 · 6767 阅读 · 0 评论 -
jav循环遍历json集合
net.sf.json-lib json-lib 2.4 jdk15String str = “[{name:‘a’,value:‘aa’},{name:‘b’,value:‘bb’},{name:‘c’,value:‘cc’},{name:‘d’,value:‘dd’}]” ; // 一个未转化的字符串JSONArray json = JSONArray.fro...原创 2019-02-16 15:21:52 · 905 阅读 · 1 评论