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
版本:1.2.83
示例:
@Getter @Setter public class Test { private String code; private String name; public static void main(String[] args) { Test test1 = JSON.parseObject("{\"code\": \"test\",\"name\": null}", Test.class, Feature.InitStringFieldAsEmpty); System.out.println(test1.getCode()); System.out.println(test1.getName()); Test test2 = JSON.parseObject("{\"code\": \"test\"}", Test.class, Feature.InitStringFieldAsEmpty); System.out.println(test2.getCode()); System.out.println(test2.getName()); } }
输出:
test null test
另外在2.0.23版本测试输出结果为:
test null test null
The text was updated successfully, but these errors were encountered:
https://github.com/alibaba/fastjson2/issues 可以到这里提issue么?
Sorry, something went wrong.
已提
No branches or pull requests
版本:1.2.83
示例:
输出:
另外在2.0.23版本测试输出结果为:
The text was updated successfully, but these errors were encountered: