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
如题
请填写以下信息:
示例:
@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 null
test test
无
The text was updated successfully, but these errors were encountered:
这个有点麻烦,要稍晚一点
Sorry, something went wrong.
add testcase for #1128
1d2bdeb
947735c
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.25-SNAPSHOT/ 问题已修复,请帮忙用2.0.25-SNAPSHOT版本验证,2.0.25版本预计在3月中旬发布。
support JSONReader.Feature.InitStringFieldAsEmpty, for #1128
0f505ba
2.0.25-SNAPSHOT版本,使用示例进行测试,目前打印如下:
test null test
@wenshao 对于 "{\"code\": \"test\",\"name\": null}" 这种情况,不考虑将null转换为空字符串?
"{\"code\": \"test\",\"name\": null}"
No branches or pull requests
问题描述
如题
环境信息
请填写以下信息:
重现步骤
示例:
输出:
期待的正确结果
输出:
相关日志输出
无
附加信息
无
The text was updated successfully, but these errors were encountered: