Example #1
0
 /*创建create_express_post*/
 public static String getCreateTakeExpressJson(CourierListItemBean itemBean) {
   String Jsonreault = " "; // 定义返回的Json字符串
   try {
     JSONObject jsonObject = new JSONObject();
     jsonObject.put("tel", itemBean.getTel());
     jsonObject.put("expressCompany", itemBean.getExpressCompany());
     jsonObject.put("tokenID", MyApplication.mUser.getTokenId());
     jsonObject.put("receiverCity", itemBean.getReceiverCity());
     jsonObject.put("isOverWeight", itemBean.getIsOverWeight());
     jsonObject.put("addressInfo", itemBean.getAddressInfo());
     jsonObject.put("userName", itemBean.getUserName());
     jsonObject.put("expressName", itemBean.getExpressName());
     jsonObject.put("collegeID", itemBean.getCollegeID());
     jsonObject.put("takeTime", itemBean.getTakeTime());
     Jsonreault = jsonObject.toString();
   } catch (Exception e) {
     e.printStackTrace();
   }
   return Jsonreault;
 }
Example #2
0
 /*创建add_expressJson*/
 public static String getCreateExpressJson(CourierListItemBean itemBean) {
   String Jsonreault = " "; // 定义返回的Json字符串
   try {
     JSONObject jsonObject = new JSONObject();
     jsonObject.put("tel", itemBean.getTel());
     jsonObject.put("expressCompany", itemBean.getExpressCompany());
     jsonObject.put("tokenID", MyApplication.mUser.getTokenId());
     jsonObject.put("expressAddress", itemBean.getExpressAddress());
     jsonObject.put("receiver", itemBean.getReceiver());
     jsonObject.put("expressName", itemBean.getExpressName());
     jsonObject.put("expressGetAddress", itemBean.getExpressGetAddress());
     jsonObject.put("collegeID", itemBean.getCollegeID());
     jsonObject.put("takeTime", itemBean.getTakeTime());
     jsonObject.put("getTime", itemBean.getGetTime());
     Jsonreault = jsonObject.toString();
     Log.d("gxy", Jsonreault);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return Jsonreault;
 }