-
Notifications
You must be signed in to change notification settings - Fork 206
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
关于版本升级后json数据解析的问题 #165
Labels
寻求帮助
Extra attention is needed
Comments
不清楚具体原因,转换器代码很简单你debug下 |
@liangjingkanji 我刚才测了下,发现从3.4.12版本一直到3.5.5版本都是没问题的,到了最新版3.5.6就出现问题了😂你是不是改了啥东西,比如默认gson解析啥的😂 |
我也遇到了一样的问题,暂时没找的原因,急着上线,就回退版本了 |
我昨晚测试发现3.5.5以下的版本都没问题,可能强东哥在3.5.6上改了啥东西🤔 |
我debug转换器,3.5.5和3.5.6返回的fromJson数据是一样的,后面跳到这个包里的JSONConvert和ResponseExtension还有NetCoroutine之后我就看不大明白了,都是直接走最后面的代码,不知道问题出在哪,继续用3.5.5了😂 |
已经修复了, 原因是为支持Java调用, 没有兼容Gson等反射解析框架的泛型擦除问题 |
👌 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
刚把Net框架从3.1.2版本升级到最新的3.5.6版本,然后返回数据解析就会报错类型转换异常,换回3.1.2就没问题了😂
期望行为
应该是和以前3.1.2版本一样数据解析成功,东西都没改,只是Net版本升级就不行了
如何复现
java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to com.example.wanAndroid.logic.model.base.ApiPagerResponse
这是用3.1.2显示的正常,3.5.6就直接走catch了
![image](https://user-images.githubusercontent.com/54784104/222963307-c5163831-7f26-422c-8ad0-4fba3c589291.png)
版本
The text was updated successfully, but these errors were encountered: