0
我使用AJAX来校准我的struts动作类,它在会话中存储了一些数据。JSON数据的Ajax响应
public String myMethod(){
session.put("DATA", JSON_STRING); //JSON formatted string
return "forward";
}
我转发到JSP页面中,我打印这个数据
<%@taglib prefix="s" uri="/struts-tags"%>
<s:property value="#session['DATA']" />
所以最终我收到了AJAX呼叫响应
[{"title": "OFP LALOUV0042/ODF96-02 PD/FP16 (L)", "key": "551"}]
我所期待是
[{"title": "OFP LALOUV0042/ODF96-02 PD/FP16 (L)", "key": "551"}]
我不同意你的方法,但在你的情况下,这可能会有所帮助:http://stackoverflow.com/questions/2241787/how-to-decode-encoded-special-xml-characters -in-a-string – gouki 2013-03-15 07:56:58