We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
abstract class B { private String id; public String getId() { return id; } public void setId(String id) { this.id = id; } @JSONField(serialize = false, deserialize = false) public abstract String getName(); } class C extends B { private String c; private String name; public String getC() { return c; } public void setC(String c) { this.c = c; } @Override public String getName() { return name; } public void setName(String name) { this.name = name; } } public void test() { LoanContractVO loanContractVO = new LoanContractVO(); C c = new C(); c.setId("22222222222"); c.setName("name"); c.setC("dddddddddddddddddd"); String json = JSON.toJSONString(c); JSONObject obj = JSON.parseObject(json); System.out.println(json); }
结果: {"c":"dddddddddddddddddd","id":"22222222222","name":"name"}
期望结果: {"c":"dddddddddddddddddd","id":"22222222222"}
The text was updated successfully, but these errors were encountered:
bug fixed for abstract class method overrride. issue #744
e84c1c7
已经实现,请使用最新的1.2.21版本 https://github.com/alibaba/fastjson/releases/tag/1.2.21
Sorry, something went wrong.
@wenshao 好的,谢谢了
support abstract method annotation. issue #744 #911
a250461
c2b2c7e
bug fixed for abstract class method overrride. issue alibaba#744
da41f04
No branches or pull requests
结果:
{"c":"dddddddddddddddddd","id":"22222222222","name":"name"}
期望结果:
{"c":"dddddddddddddddddd","id":"22222222222"}
The text was updated successfully, but these errors were encountered: