JSONObject把对象转换成的json字符串,无法直接通过request.setAttribute();传到页面的input标签
如下是错误的:
request.setAttribute(“pageInfoJsonStr”, JSONObject.fromObject(pageInfo).toString());
还需要 jsonStr.replaceAll(“\”“, “’”)再放到request.setAttribute中
JSONObject把对象转换成的json字符串,无法直接通过request.setAttribute();传到页面的input标签
如下是错误的:
request.setAttribute(“pageInfoJsonStr”, JSONObject.fromObject(pageInfo).toString());
还需要 jsonStr.replaceAll(“\”“, “’”)再放到request.setAttribute中