Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix issue #828 #837

Merged
merged 1 commit into from
Oct 12, 2022
Merged

fix issue #828 #837

merged 1 commit into from
Oct 12, 2022

Conversation

yanrongzhen
Copy link
Contributor

@yanrongzhen yanrongzhen commented Oct 12, 2022

What this PR does / why we need it?

修复issue #828, JsonObject中加入null值后, 出现冗余逗号的问题
原逻辑是如果不是第一个元素, 就先加一个逗号, 再判断WriteMapNullValue决定是否跳过, 这里如果用户没有WriteMapNullValue的Feature, 则会出现一个空逗号

Summary of your change

将判断Feature的逻辑前置, 不满足条件直接跳过该字段, 避免空逗号问题

@wenshao wenshao merged commit 55850bf into alibaba:main Oct 12, 2022
@wenshao wenshao added this to the 2.0.16 milestone Oct 12, 2022
@wenshao wenshao added the bug Something isn't working label Oct 12, 2022
@wenshao
Copy link
Member

wenshao commented Oct 22, 2022

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants