首页  编辑  

GSon把JSON转为List<XXXXObject>

Tags: /Java/   Date Created:
Gson gson = new Gson();
Type listType = new TypeToken<ArrayList<ScriptStep>>() {
}.getType();

List<ScriptStep> steps = gson.fromJson(json, listType);