@Override protected void parseJSONObject(JSONObject jsonObject) throws JSONException { super.parseJSONObject(jsonObject); JSONObject result = jsonObject.getJSONObject("result"); updateState = result.getString("updateState"); updateInfo = result.getString("updateInfo"); }
@Override protected void parseJSONObject(JSONObject jsonObject) throws JSONException { super.parseJSONObject(jsonObject); dataForAskMes = new ArrayList<GoodsListDataForAskMe>(); JSONArray jsonArray = jsonObject.getJSONArray("result"); for (int i = 0; i < jsonArray.length(); i++) { GoodsListDataForAskMe data = new GoodsListDataForAskMe(); JSONObject result = (JSONObject) jsonArray.get(i); data.setInquiryItemCode(result.getString("inquiryItemCode")); data.setInfoId(result.getInt("InfoId")); data.setInquiryId(result.getInt("InquiryId")); data.setDeparture(result.getString("Departure")); data.setArrival(result.getString("Arrival")); data.setAcceptStartTime(result.getString("AcceptStartTime").split("T")[0]); data.setAcceptEndTime(result.getString("AcceptEndTime").split("T")[0]); data.setInfoType(result.getString("InfoType")); data.setOrderCount(result.getInt("OrderCount")); data.setGoodsName(result.getString("GoodsName")); JSONArray jaIDs = result.getJSONArray("InquiryAccountId"); int[] ids = new int[jaIDs.length()]; for (int j = 0; j < ids.length; j++) { ids[j] = jaIDs.getInt(j); } data.setInquiryAccountIds(ids); dataForAskMes.add(data); } }
/** * OrderId integer false 订单Id BookState integer false 预订状态 InfoId integer false 发布的信息Id InfoType * string true 发布信息类型:car,line,goods IconUrl string true 企业logo CompanyName string true 公司/个人名称 * IsBargaining boolean false 是否面议 TransportPrice float false 运价 Departure string true 始发地 Arrival * string true 目的地 AcceptStartTime dateTime false 承运开始时间 AcceptEndTime dateTime false 承运截止时间 * InfoName string true 信息名称 OrderCount integer false 已完成订单数量 IsSpecialLogisticsProvider boolean * false 是否是特约物流商 isHavingDeposit boolean false 是否有诚信保证金 Degree integer false 积分级别 * ObjectEntryState integer false * * @author Administrator */ @Override protected void parseJSONObject(JSONObject jsonObject) throws JSONException { super.parseJSONObject(jsonObject); result = jsonObject.getBoolean("result"); Log.i("json", result + ""); }