I am running into a problem where I am trying to include a List as the root node, but I can\'t seem to be able to get this. Let me explain. Let\'s say we have a class \"Test
I'd expect the basic idea to be something like:
class UtilityClass {
List listOfTestClasses;
UtilityClass(List tests) {
this.listOfTestClasses = tests;
}
}
String utilityMethod(){
List list = someService.getList();
UtilityClass wrapper = new UtilityClass(list);
new ObjectMapper().writeValueAsString(wrapper);
}