1. 首先定义JSON对象对应的Java Bean
2. Spring MVC controller方法参数 @RequestBody MyBean bean
3.Ajax提交方式:
$.ajax({
type: "post",
async: false,
url: "...",
data: JSON.stringify(param),
contentType: "application/json; charset=utf-8",
dataType: "json",
error: function () {
},
success: function (data) {
}
});
4. 开发过程中要注意Java Bean和JSON数据对应的数据类型要匹配