android中的Youtube解析Json

android中的Youtube解析Json,android,json,youtube,Android,Json,Youtube,我试图创建一个到youtube的请求,并试图解析json-c 这是我们的工作: 但当我尝试通过播放列表\u Id和此链接获取视频时: 它不起作用,这是我解析JSON的代码: public void getData() { HttpClient httpclient = new DefaultHttpClient(); httpclient.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersi

我试图创建一个到youtube的请求,并试图解析json-c 这是我们的工作:

但当我尝试通过播放列表\u Id和此链接获取视频时:

它不起作用,这是我解析JSON的代码:

public void getData()
{
    HttpClient httpclient = new DefaultHttpClient();
    httpclient.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);


    HttpGet request = new HttpGet("http://gdata.youtube.com/feeds/api/playlists/PLFApv2COP4eq9pnSqtSV_1GpkvFE0EWi6?v=2&alt=jsonc");     


    try
    {
    HttpResponse response = httpclient.execute(request);
    HttpEntity resEntity = response.getEntity();
    String _response=EntityUtils.toString(resEntity); 

    JSONObject json = new JSONObject(_response);

    JSONArray jsonArray = json.getJSONObject("data").getJSONArray("items");
    for (int i = 0; i < jsonArray.length(); i++) {
        JSONObject jsonObject = jsonArray.getJSONObject(i);

        String title1 = jsonObject.getString("title");
        title.add(title1);
        String thumbUrl = jsonObject.getJSONObject("thumbnail").getString("sqDefault");
        URL url1 = new URL(thumbUrl);
        Bitmap bmp = BitmapFactory.decodeStream(url1.openConnection().getInputStream());
        thumb.add(bmp);
        String url;
        try {

            url = jsonObject.getJSONObject("player").getString("default");
            msg.add(url);
        } catch (Exception ignore) {

       }
    }
    } 
    catch(Exception e1)
        {
            e1.printStackTrace();
        }

    httpclient.getConnectionManager().shutdown();
}

粘贴代码错误。没有代码错误它适用于第一个链接,但我没有得到任何与第二个链接link@OussamaJebali看看我的问题: