mirror of
https://gitee.com/xiaonuobase/snowy.git
synced 2025-12-25 23:56:20 +08:00
【新增】Jackson序列化配置,支持null值转为数据类型初始值
【新增】Jackson序列化配置,支持null值转为数据类型初始值 Signed-off-by: bubu <8096927+bubu-space@user.noreply.gitee.com>
This commit is contained in:
parent
5a3fb9310c
commit
a8626b0b9f
@ -95,6 +95,8 @@ public class JacksonConfig {
|
||||
gen.writeNumber(0);
|
||||
} else if (type == Boolean.class) {
|
||||
gen.writeBoolean(false);
|
||||
} else if (type == Date.class) {
|
||||
gen.writeString("");
|
||||
} else if (type.isArray() || Collection.class.isAssignableFrom(type)) {
|
||||
gen.writeStartArray();
|
||||
gen.writeEndArray();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user