Type type = new TypeToken<List<String>>(){}.getType();. TypeToken<T>中T为所需要的类型,再把这个Type对象传递给fromJson即可完成转换.
確定! 回上一頁