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

JSONObject 1.2.57开始被重写的toJavaObject()方法 #2516

Closed
yl-yue opened this issue Jun 27, 2019 · 4 comments
Closed

JSONObject 1.2.57开始被重写的toJavaObject()方法 #2516

yl-yue opened this issue Jun 27, 2019 · 4 comments
Milestone

Comments

@yl-yue
Copy link
Contributor

yl-yue commented Jun 27, 2019

问题描述:
经过详细的排查发现1.2.57开始,JSONObject类重写了toJavaObject()方法,被重写的方法不再支持转自身类型与JSONObject类型的转换。

期望:
去掉方法重写,或增强重写方法。如果为类型本身将不需要转换,如果是JSONObject类型,执行JSONObject转换操作。

@yl-yue
Copy link
Contributor Author

yl-yue commented Jun 27, 2019

image
这里是有一套标准,或者新的思路么。

@wenshao
Copy link
Member

wenshao commented Jun 27, 2019

能提供重现问题case么?

@wenshao wenshao added this to the 1.2.59 milestone Jun 27, 2019
@yl-yue
Copy link
Contributor Author

yl-yue commented Jul 1, 2019

JSONObject jsonObject = new JSONObject();
jsonObject.toJavaObject(JSONObject.class);

wenshao added a commit that referenced this issue Jul 31, 2019
@wenshao
Copy link
Member

wenshao commented Jul 31, 2019

https://github.com/alibaba/fastjson/releases/tag/1.2.59
已修复,请用新版本

@wenshao wenshao closed this as completed Jul 31, 2019
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