这是两个类型不同的json与ajax的数据交互(集合、类对象)
JsonConfig jsonConfig = new JsonConfig(); //lenient
jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT);
JSONArray json = JSONArray.fromObject(listPm, jsonConfig);
outJSONData(json);
Blog b=(Blog) bgdao.findBlog(Integer.parseInt(id));
b.setBbsCenterStr( new String(b.getBbsCenter()));
JSONArray json = JSONArray.fromObject(b);
outJSONData(json);
ajax接收:
dataType:"json",
success: function(data) {
var crmHtmlg = '';
$.each(data,function(i,comment){
crmHtmlg+=' '
+' '+comment.bbsTitle+' '
+' '
});
$('#bowenchakan').html(crmHtmlg);
查看更多关于json传值以及ajax接收_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did112312