「Java入門」JSONArray.toCollectionで文字列をlistに変換する方法

Javaコード
public static List<Student> converStudentFormString(String student){
if (student == null || student.equals(“"))
return new ArrayList();

JSONArray jsonArray = JSONArray.fromObject(answer);
List<Student> cftLst = (List) JSONArray.toCollection(jsonArray,
Student.class);

return cftLst;
}

Java

Posted by arkgame