public static CourierListItemBean parseBringSearchJson(String jsonData) { CourierListItemBean item = new CourierListItemBean(); try { JSONObject jsonObject = new JSONObject(jsonData); JSONObject data = new JSONObject(jsonObject.getString("data")); item.setTel(data.getString("tel")); item.setExpressNum(data.getString("expressNum")); item.setExpressCompany(data.getString("companyName")); item.setUserID(data.getString("userID")); item.setExpressAddress(data.getString("expressAddress")); item.setReceiver(data.getString("receiver")); item.setExpressName(data.getString("expressName")); item.setExpressGetAddress(data.getString("expressGetAddress")); item.setPublishedTime(data.getString("publishedTime")); item.setLogisticsID(data.getString("logisticsID")); item.setCompanyName(data.getString("companyName")); } catch (Exception e) { e.printStackTrace(); } return item; }
/*解析TakeJson*/ public static CourierListItemBean parseTakeSearchJson(String jsonData) { CourierListItemBean item = new CourierListItemBean(); try { JSONObject jsonObject = new JSONObject(jsonData); JSONObject data = new JSONObject(jsonObject.getString("data")); item.setTel(data.getString("tel")); item.setExpressCompany(data.getString("expressCompany")); item.setUserID(data.getString("userID")); item.setReceiverCity(data.getString("receiverCity")); item.setPublishedTime(data.getString("publishedTime")); item.setAddressInfo(data.getString("addressInfo")); item.setLogisticsID(data.getString("logisticsID")); item.setExpressNum(data.getString("expressNum")); item.setIsOverWeight(data.getInt("isOverWeight")); item.setUserName(data.getString("userName")); item.setExpressNum(data.getString("expressNum")); } catch (Exception e) { e.printStackTrace(); } return item; }