摘要: Gson是Google开发的Java比较好用的 Json工具。使用挺简单,假设有个类:1 class Runner {2 int attr;3 String name;4 public Runner(int attr, String name) {5 this.attr = attr;6 this.name = name; 7 }8 }Object -> JSON (关键 line 3):1 Gson gson = new Gson();2 Runner runner = new Runner(3, "lhfcw... 阅读全文
posted @ 2013-12-20 20:26 Lhfcws 阅读(344) 评论(0) 推荐(0) 编辑