美文网首页
Retrofit中Gson手动转换代码片段

Retrofit中Gson手动转换代码片段

作者: lcgao | 来源:发表于2017-10-27 09:30 被阅读0次
    // 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