Exemplo n.º 1
0
  /**
   * @param content
   * @return 在线教学**全部视频数据
   */
  public static List<VideoBean> parseVideo(String content) {
    List<VideoBean> dates = new ArrayList<VideoBean>();
    try {
      JSONObject jsonobject = new JSONObject(content);
      JSONArray ja = new JSONArray(jsonobject.getString("data"));
      for (int i = 0; i < ja.length(); i++) {
        VideoBean vipRoomBean = new VideoBean();
        vipRoomBean.picUrl = ja.getJSONObject(i).getString("picUrl");

        vipRoomBean.videoUrl = ja.getJSONObject(i).getString("videoUrl");

        vipRoomBean.timeLen = ja.getJSONObject(i).getString("timeLen");
        vipRoomBean.id = ja.getJSONObject(i).getInt("id");
        vipRoomBean.title = ja.getJSONObject(i).getString("title");

        dates.add(vipRoomBean);
      }
      return dates;
    } catch (JSONException e) {
      e.printStackTrace();
    }
    return dates;
  }