页面的ajax的请求json
jQuery.ajax({
type: "POST",
url: "/createTopic",
async : false,
data:JSON.stringify({
"xxx":topic,
"yyy":topicDesc,
"aaa":maxRetryTime,
"bbb":retryInterval,
}),
dataType: "json",
contentType:"application/json;charset=UTF-8",
success: function(data){
if(data!=null){
jQuery("[name='topicId']").val(data.topicId);
jQuery("[name='topicName']").val(data.topicName);
}else{
alert(data.message);
}
}
});