下面的代碼來解析可以通過下面的代碼我不能夠從URL使用JSON數據。無法與Android中
try{
HttpClient client= new DefaultHttpClient();
HttpGet http= new HttpGet("http://api.androidhive.info/contacts/");
HttpResponse response = client.execute(http);
HttpEntity httpentity = response.getEntity();
is= httpentity.getContent();
}catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}