Je posterai ci-dessous contiennent JSONcontrôleur ressort JSON recevoir JSON Liste
{"testListObject":[{"testText":"bbb","testDate":"02.01.2011 00:00:00.000"},{"testText":"aaa","testDate":"01.01.2011 00:00:00.000"}]}
dans mon contrôleur de printemps, j'ai
@RequestMapping(value = "/post/tester/", method = RequestMethod.POST)
public @ResponseBody String postItinerary(@ModelAttribute("testListObject") TestList testList) throws IOException {
System.out.println("1="+testList); //ok
System.out.println("2="+testList.childListObject); //print null
}
Toute idée pourquoi j'obtenir null pour Liste childListObject?
mon regard pojo comme ci-dessous
public class TestList(){
public List<ChildObject> childListObject;
//get and set
}
public class ChildObject(){
public String testText;
public String testDate;
//get and set
}