3
나는이 같은 JSON 개체를 구축 스트럿츠에 아약스에서 게시핸들 JSON 배열은 1.3
sendData = function() {
$.ajax({
url :'<html:rewrite action="/sendData"/>',
type: "POST",
dataType: 'json',
contentType: "application/json; charset=utf-8",
data : {"list":list.item},
success:function(data) {
alert(data);
},
error: function(jqXHR, textStatus, errorThrown) {
alert("Error");
}
});
}
가 어떻게 내 행동에 검색 할 수 JSONArray/JSONObject
그리고 처리할까요? 나는 이것을 시도했다 :
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
String list = request.getParameter("list"); //null, I supposed to find a string formatted like json
return null;
}
심지어 GSON 라이브러리도 허용된다!