// Gson转换 代码片段
Type type = new TypeToken<Result<List<NewFriend>>>(){}.getType();
Result<List<NewFriend>>> result = new Gson().fromJson(responseBody.string(), type);
// Gson转换 代码片段
Type type = new TypeToken<Result<List<NewFriend>>>(){}.getType();
Result<List<NewFriend>>> result = new Gson().fromJson(responseBody.string(), type);
本文标题:Retrofit中Gson手动转换代码片段
本文链接:https://www.haomeiwen.com/subject/suqrpxtx.html
网友评论