I am trying to write a REST PUT method and I am not sure how you get the body that the requestor is sending. For example, he is going to send a Person object serialized to JSON and I want to serialize the JSON back to a Person object.
I couldn't find much on Spring PUT, but here is what I have:
@RequestMapping(method = RequestMethod.PUT)
public Person registerPerson(@PathVariable String siteId, @ModelAttribute("personForm") Person user) throws Exception {
//some Logic
}
I don't think I am doing this correctly. Does @ModelAttribute automatically serialize?