Announcement Announcement Module
Collapse
No announcement yet.
Spring + AJAX + JSON Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment


    • #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.

      Comment

      Working...
      X