-
Aug 11th, 2011, 08:13 AM
#1
Spring + AJAX + JSON
Hi,
Is there a way to post a JSON array object to a Spring controller using ajax?
In controller, I like to do something like
public @ResponseBody String doSomething(@RequestBody List<Product> productList){ ..... }
where Product is a bean class.
Thx in advance
Steven
-
May 21st, 2012, 11:27 PM
#2
I am having the same problem. Trying to post a json array of events to a spring controller. Does anyone know the answer to this problem?
Thanks
-
May 22nd, 2012, 12:39 AM
#3
I solved the problem. You don't need bracket when you send Json array. Example, {array:"1,2,3"} instead of {array:"[1,2,3]"}. I hope it helps.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules