合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
~~~ String lience=chepai_short.getText().toString()+chepai_number.getText().toString(); openmap.put("lience",lience.toString()); openmap.put("UserName", tv_username.getText().toString()); openmap.put("cardtype",tv_cardtype.getText().toString()); openmap.put("InOutName", tv_inrk.getText().toString()); openmap.put("InOperatorCard",SwitchActivity.username.toString()); //SwitchActivity.username // jsonpost_mode mode=new jsonpost_mode(); // mode.Lience(lience); // mode.UserName(tv_username.getText().toString()); // mode.Cardtype(); String resultData=""; String content=""; if(openmap.size()!=0){ GsonBuilder gsonBuilder = new GsonBuilder(); // gsonBuilder.registerTypeAdapter(Exception.class, new ExceptionSerializer()); Gson gson = gsonBuilder.create(); content="Josnstr="+ URLEncoder.encode(gson.toJson(openmap),"utf-8"); } resultData=HttpPostTools.getPostReslut("Home/GateInSet", content); ~~~ 记得在object类型中要确定好类型。特别是getext()请记得tostring()...