字符串获取json和发送https请求

1获取https请求
只要写一个验证请求的工具类(这个工具类需要实现 接口).
在进行https请求时,用这个工具类验证一下就可.
 
2 获取jeson格式字符串中的json值.
首先导入json的包json-simple json-lib(其实还有很多依赖的包)
然后JSONObject fromObject = JSONObject.fromObject(s);
Object object = fromObject.getString("access_token");

猜你喜欢

转载自www.cnblogs.com/xinyou/p/9255092.html