Skip to content
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

多层泛型封装报错 #8

Open
jp0533 opened this issue Nov 22, 2018 · 1 comment
Open

多层泛型封装报错 #8

jp0533 opened this issue Nov 22, 2018 · 1 comment

Comments

@jp0533
Copy link

jp0533 commented Nov 22, 2018

数据类型如下:
{"code":200,"msg":"success","result":[{"field1":"value1","field2":"value2"},{"field1":"value3","field2":"value4"}]}
解析时可以解析到result,result我传的是泛型List,解析出来的Bean是com.alibaba.fastjson.JSONObject,不能转成Bean,报错信息如下:
Caused by: java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to com.hellojp.jplibrary.database.my.MyBean,不知道你有没有遇到过这种情况。

@echojiangyq
Copy link

遇到同样的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants