Gson 將list封裝成json

Gson gson = new Gson(); String s = HttpUtil.doGet("xxxx"); List<Tag> list = new ArrayList<Tag>(); list = gson.fromJson(s, list.getClass()); modelAndView.addObject("tag", list);
相關文章
相關標籤/搜索