JsonConfig jsonConfig = new JsonConfig();jsonConfig.setExcludes(excludes);JSONArray fromObject = JSONArray.fromObject(obj,jsonConfig);String json = fromObject.toString();//json格式的字符串