
jsonObject
happy_marvin
这个作者很懒,什么都没留下…
展开
-
json 传回的是数组和非数组的解决的方法
1.List booktypes = booktypeService.find("from Booktype where parent=null"); 下面就是数组原创 2014-06-22 09:40:43 · 726 阅读 · 0 评论 -
将一个json的字符串转换为bean
String u="{'name':'sail331x','psw':'123456789'}"; User user=(User)JSONObject.toBean(JSONObject.fromObject(u),User.class);原创 2014-06-22 13:53:09 · 1385 阅读 · 0 评论 -
下面的代码告诉你返回的时候应该如何选择(返回的是数组还是对象)
JsonConfig config = new JsonConfig(); config.setExcludes(new String[]{"books","booktype"}); JSONArray array = new JSONArray(); //JSONObject jsonObject = new JSONObject(); //String t =原创 2014-06-22 21:40:47 · 652 阅读 · 0 评论