日期:2014-05-17 浏览次数:20867 次
StringBuffer buffer = new StringBuffer();
buffer.append("This is a test");
buffer.append(System.getProperty("line.separator"));
buffer.append("This is another test");
MyObject obj = new MyObject();
obj.setSuccessRow(20);
obj.setMsg(buffer.toString());
JsonArray array = JsonArray.fromObject(obj);
JsonObject json = new JsonObject();json .put("list",array);
XXX.write(json.toString());
buffer.append("This is a test");
buffer.append(System.getProperty("line.separator"));
buffer.append("This is another test");
改成:
buffer.append("This is a test");
buffer.append("<br/>");
buffer.append("This is another test");