-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务器返回数据的解析(ApiResultFunc<T>)是一个一直未被解决的槽点 #232
Comments
这是我改造之后的数据解析类,一定程度上解决了请求成功和失败的时候,data返回不同类型的问题,例如: 解析类
|
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
可以根据ApiResult.isOk()判断解不解析data,当请求失败的时候data返回一个默认的 T,这样就可以解决请求成功和请求失败的时候服务器返回的data数据不一样导致Gson解析报错的问题。
The text was updated successfully, but these errors were encountered: