json 转 List<User>
CollectionType collectionType = MAPPER.getTypeFactory().constructCollectionType(ArrayList.class, GroupUser.class);
//the sieze of the list is dependon the str json length although the json content is not the POJO type maybe
ArrayList<GroupUser> groupUsers = MAPPER.readValue(res, collectionType);
json 转 数组
ArrayType arrayType = MAPPER.getTypeFactory().constructArrayType(User.class);
User[] users = MAPPER.readValue(expected, arrayType);
json 转 boject
User user = MAPPER.readValue(expected, User.class);
Object 转json
String test = MAPPER.writeValueAsString(users);