FastJson 将JSONArray转换为List

JSONArray test=new JSONArray();
test.add("1");
test.add("2");
test.add("3");
test.add("4");
//将JSONArray转换为String
String testString=JSONObject.toJSONString(test, SerializerFeature.WriteClassName);
//将String转化为List<String>
List<String> testList=JSONObject.parseArray(testString,String.class);

代码如上java