I can use struts built in json converters to serialize and deserialize json. As asked at: Using Struts 2 builtin JSON utility class
JSONPopulator populator = new JSONPopulator();
SampleVO vo = new SampleVO();
populator.populateObject(vo, map);
But It dose not work with list, for example:
List<SampleVO> listSamples = new ArrayList<>();
populator.populateObject(listSamples, map);
The error is:
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
I found that there are convertToCollection and convertToArray methods in `JSONPopulator, they are private, and I don't know if this util class can help me?