2012年12月3日

日志12.03

摘要: Gson 是 Google 提供的用来在 Java 对象和 JSON 数据之间进行映射的 Java 类库。可以将一个 JSON 字符串转成一个 Java 对象,或者反过来。示例代码:Gson gson = new Gson();int[] ints = {1, 2, 3, 4, 5};String[] strings = {"abc", "def", "ghi"};(Serialization) gson.toJson(ints); ==> prints [1,2,3,4,5]gson.toJson(strings); ==&g 阅读全文

posted @ 2012-12-03 20:04 勤修 阅读(181) 评论(0) 推荐(0) 编辑

导航