0

how I could post jsonArray through Ajax call to the spring controller??

[{"REQUEST_ID":"BBBBBBB","MATCH_COUNT":"Accountant","CLIENT_ID":"Tokyo","MATCH_REASON":"63","NAME":"2011/07/25","FATHER_NAME":"$170,750"},{"REQUEST_ID":"CCCCCCC","MATCH_COUNT":"Junior Technical Author","CLIENT_ID":"San Francisco","MATCH_REASON":"66","NAME":"2009/01/12","FATHER_NAME":"$86,000"}]

this is my JSON array want to pass this!!

$.ajax({
            type : "POST",
            dataType: 'json',

            contentType:'application/json',

            url : "getCheckBoxData",
            data : JSON.stringify(jsonData),
        //  data : "data="+JSON.stringify(data),
            //async : false,
            success : function(response) {

@RequestMapping(value = "/getCheckBoxData", method = RequestMethod.POST)
public String checkBoxData(@RequestBody List<ListOfCheckBox> value, HttpSession session
m7md2112
  • 327
  • 3
  • 13

1 Answers1

0

The data you are sending should match the parameter type in the controller function. What exact problem are you facing ?

Japleen
  • 63
  • 5