-
Notifications
You must be signed in to change notification settings - Fork 479
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
[BUG] #287
Comments
能帮验证下2.0.3是否还存在这个问题么? |
可以了,谢谢。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
简要描述您碰到的问题。
JSONObject 转 Object 问题
转换的类里面集合有set属性时,会报错
Exception in thread "Thread-22" Exception in thread "Thread-21" com.alibaba.fastjson2.JSONException: can not cast to java.util.Set,
用fastjson 1.x版本不存在这个问题,看源码是因为 jsonArray 1.x版本中用的Collection接收,进行转换不存在这个问题。
而fastjson2 会通过ObjectReaderProvider找到对应的reader去转换对象,而目前默认没有jsonArray 转 Set这种reader,
所以现在有什么简单方式实现我这个需求么。
环境信息
请填写以下信息:
The text was updated successfully, but these errors were encountered: