transient FTPServerSych ftpServerSych;
2.调用序列化操作时:
JsonConfig jsonConfig = new JsonConfig(); jsonConfig.setIgnoreTransientFields(true);//设置为不序列化transient的字段 strResult = JSONArray.fromObject(ftpServerList,jsonConfig).toString();
JsonConfig jsonConfig = new JsonConfig(); jsonConfig.setIgnoreTransientFields(true);//设置为不序列化transient的字段 strResult = JSONArray.fromObject(ftpServerList,jsonConfig).toString();