随笔分类 -  Json

摘要:Map map = new HashMap(); map.put("url", "&response_type=code&scope=snsapi_base&state=2#wechat_redirect"); Gson gson = new GsonBu... 阅读全文
posted @ 2015-04-08 11:33 yshy 阅读(1078) 评论(0) 推荐(0) 编辑
摘要:package iotest;import com.google.gson.Gson;import com.google.gson.JsonArray;import com.google.gson.JsonElement;import com.google.gson.JsonObject;impor... 阅读全文
posted @ 2015-04-05 10:58 yshy 阅读(11501) 评论(0) 推荐(0) 编辑
摘要:例如以下格式JSON:建立对应的Java对象,注意内部类要定义成静态的public class HResult { public String total; public String records; public String page; public L... 阅读全文
posted @ 2015-01-08 10:58 yshy 阅读(1782) 评论(0) 推荐(0) 编辑
摘要:/** * httpcomponents-client-4.3.6 * @author y */public class HttpUtil { public static String httpPost( List formparams,final String url){ ... 阅读全文
posted @ 2014-12-16 12:29 yshy 阅读(1064) 评论(0) 推荐(0) 编辑
摘要:package test;import com.google.gson.Gson;import com.google.gson.reflect.TypeToken;import java.util.ArrayList;import java.util.Iterator;import java.util.List;/** * @author */public class GsonTest { public static void main(String args[]){ //parseJSONObject(); //parseJSONA... 阅读全文
posted @ 2014-03-11 23:13 yshy 阅读(291) 评论(0) 推荐(0) 编辑
摘要:(1):并列的数据之间使用逗号(",")分割;(2):键值对的映射用冒号(":")表示;(3):并列数据的集合(数组)用方括号("[]")表示。(4):映射的集合(对象)用大括号("{}")表示。 阅读全文
posted @ 2013-10-18 14:29 yshy 阅读(222) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示