/** * @param 推荐 * @return */ public static List<MarkShopBean> golfGoodsRecommend(String content) { List<MarkShopBean> dates = new ArrayList<MarkShopBean>(); try { JSONObject jsonobject = new JSONObject(content); MarkShopBean markShopBean12 = new MarkShopBean(); JSONArray ja = new JSONArray(jsonobject.getString("data")); Log.e("log", "--- 推荐数据-------" + ja.toString()); for (int i = 0; i < ja.length(); i++) { markShopBean12.bean = JSON.parseObject( ja.getJSONObject(i).optString("golfGoodsRecommend"), SelectMallRecommendBean.class); markShopBean12 = JSON.parseObject(ja.getJSONObject(i).optString("golfGoods"), MarkShopBean.class); dates.add(markShopBean12); } return dates; } catch (JSONException e) { e.printStackTrace(); } return dates; }
/** * @param 抢购 * @return */ public static List<MarkShopBean> SnapupGood(String content) { List<MarkShopBean> dates = new ArrayList<MarkShopBean>(); try { JSONObject jsonobject = new JSONObject(content); MarkShopBean markShopBean12 = new MarkShopBean(); JSONArray ja = new JSONArray(jsonobject.getString("data")); for (int i = 0; i < ja.length(); i++) { markShopBean12 = JSON.parseObject(ja.getJSONObject(i).optString("golfGoods"), MarkShopBean.class); markShopBean12.snapupGoodBean = JSON.parseObject( ja.getJSONObject(i).optString("golfGoodsSnapUp"), SnapupGoodBean.class); markShopBean12.currentDate = jsonobject.getLong("currentDate"); dates.add(markShopBean12); } return dates; } catch (JSONException e) { e.printStackTrace(); } return dates; }