json解析方法/**
* 获取网络的最新视频资讯 JSON
* @return
* @throws Exception
*/
public static List getJSONLastVideos() throws Exception
{
String path="http://192.168.1.168:8080/video/data=json";
URL url=new URL(path);
HttpURLConnection conn=(HttpURLConnection)url.openConnection();
conn.setRequestMethod("GET");
conn.setReadTimeout(1000*5);
if(conn.getResponseCode()==200)
{
InputStream inputStream=conn.getInputStream();
return parseJSON(inputStream);
}
return null;
}
/**
* 解析JSON 数据
* @param inputStream
* @return
* @throws Exception
*/
private static List parseJSON(InputStream inputStream)
{
List videos=new ArrayList();
try
<