Exemplo n.º 1
0
  /**
   * @param content
   * @return 课程***全部数据
   */
  public static List<VideoBean> parse_kechen(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.introduce = ja.getJSONObject(i).getString("introduce");
        vipRoomBean.price = ja.getJSONObject(i).getString("price");
        vipRoomBean.id = ja.getJSONObject(i).getInt("id");
        vipRoomBean.title = ja.getJSONObject(i).getString("title");
        vipRoomBean.level = ja.getJSONObject(i).getString("level");

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