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

建议JSONWrier.Feature.NullAsDefaultValue改变 #391

Closed
HuShao96 opened this issue Jun 1, 2022 · 2 comments
Closed

建议JSONWrier.Feature.NullAsDefaultValue改变 #391

HuShao96 opened this issue Jun 1, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@HuShao96
Copy link

HuShao96 commented Jun 1, 2022

请描述您的需求或者改进建议

建议JSONWrier.Feature.NullAsDefaultValue行为中,number默认值去掉。或者把集合,字符串和数值类型分开配置。

请描述你建议的实现方案

1.0是分开,比较灵活。并且个人觉得,字符串(null转"")和集合(null转[])严格意义来说也是空的,只不过是形式改变了而已,但是number从null 转0;不管对于业务来说都是不实际的

@HuShao96 HuShao96 added the enhancement New feature or request label Jun 1, 2022
@HuShao96 HuShao96 changed the title [FEATURE] 建议JSONWrier.Feature.NullAsDefaultValue改变 Jun 1, 2022
@wenshao wenshao added this to the 2.0.6 milestone Jun 1, 2022
@wenshao
Copy link
Member

wenshao commented Jun 1, 2022

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.6-SNAPSHOT/

已经支持,请帮忙用2.0.6-SNAPSHOT版本验证,2.0.6正式版预计6月5日前发布

@wenshao
Copy link
Member

wenshao commented Jun 4, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.6
问题已经修复,请用新版本

@wenshao wenshao closed this as completed Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants