这是struts2 中 action的代码片段public String searchStandardByid() throws Exception {
standard = new Standard();
standard = standardManager.findStandardById(standard_id);
Map map = new HashMap();
map.put("standardinfo", standard.getStandard_info());
map.put("standardid", standard.getStandard_id());

JSONObject obj = JSONObject.fromObject(map);
this.standardJson = obj.toString();

return SUCCESS;
}
其中stanardJson返回的值是{{"standardid":"11111"},{"standardinfo":"akdjfkdfjkdjf"}}在struts.xml中的配置是<struts>
<package name="standard" extends="json-default" namespace="/standard">

<action name="searchStandardByid" class="standardAction" method="searchStandardByid">
<result type="json" name="success">
<param name="includeProperties">standardid,standardinfo</param>
                                 <!--是不是这个地方出的问题-->
</result>
</action>
</package>
</struts>
在jsp页面上用jquery操作function addmodify(standardid){
datat = {standard_id:standardid};
$.getJSON("../standard/searchStandardByid.action",datat,function(data){
alert(data[0]);
$.each(data,function(entryIndex,entry){
             data[entryIndex]['standardinfo'] = htmlDecode(data[entryIndex]['standardinfo']);
});
});

}
取出json值为空,data是{},里面没有数据如果改了struts.xml中我标记部分的配置为<param name="root">standardid,standardinfo</param>
或是
<param name="root">*</param>取json值的时候data为undefine的,请大家帮帮我看看是什么原因