首页 > TAG信息列表 > jsonObject2
组装json报文
JSONObject jsonObject1 = new JSONObject(); jsonObject1.put("shipmentNo", shipmentNo); jsonObject1.put("customerPoNo", customerPoNo); jsonObject1.put("detailDeliveryAddress", detailDeliveryAddress); jsonObject1.put("totJSON常用方法
一. java 1.导入包 com.alibaba.fastjson <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.4</version> </dependency> net.sf.json <dependency> <grouJSON转换相关
对象转json 1. JSONObject jsonObject1 = (JSONObject)JSONObject.toJSON(iotDeviceOnline.getData()); //fastjson 对象转json 2. net.sf.json.JSONObject jsonObject2 = net.sf.json.JSONObject.fromObject(iotDeviceProperties.getData());// 对象转json j删除JSONObject value为空的属性
for(Object object : jsonArray){ String zsUrl = ""; if(surApplyZdxx.getQlsdfs().equals("2")){//正式图层ID zsUrl = layerIdDs; }else{ zsUrl