0

When

jQuery.ajax({ ... 
     data: { 
           search: {input : 'value'} 
           array : [1,2]

     }
}

The method will request the url:

url?search[input]=value&array[]=1&array[]=2

which follows the application/x-www-form-urlencoded format from what I understand.

But the Spring application, can not turn this into a HashMap for search or array[] on key array on the server side.

Instead this is what we get,

enter image description here

Is there a way to add filter in Spring to participate in the creation of the request.getParameterMap() ?

Are there any such filters already written and available as opensource?

Any other thoughts?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
mjs
  • 21,431
  • 31
  • 118
  • 200
  • FYI: this is definitely not "conform application/x-www-form-urlencoded format". It's conform "PHP format". See also a.o. http://stackoverflow.com/questions/3061273/send-an-array-with-an-http-get – BalusC Sep 26 '16 at 07:15
  • @BalusC The thing is that jQuery seems to prefer this format, and I would like the option of getting access to hashmap like properties. Of course I could build it myself, but server side is already parsing the query once. – mjs Sep 26 '16 at 16:35
  • I am mostly interested in the hashmap functionality, as getting the array already works. – mjs Sep 26 '16 at 16:37

0 Answers0