mirror of https://gitee.com/xiaonuobase/snowy
【新增】Jackson序列化配置,支持null值转为数据类型初始值
【新增】Jackson序列化配置,支持null值转为数据类型初始值 Signed-off-by: bubu <8096927+bubu-space@user.noreply.gitee.com>pull/252/head
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…
Reference in New Issue