https://www.baeldung.com/jackson-ignore-null-fields
ObjectMapper mapper = new ObjectMapper();
// 字段值为null, 也要序列化
mapper.setSerializationInclusion(JsonInclude.Include.ALWAYS);
https://www.baeldung.com/jackson-ignore-null-fields
ObjectMapper mapper = new ObjectMapper();
// 字段值为null, 也要序列化
mapper.setSerializationInclusion(JsonInclude.Include.ALWAYS);
本文标题:jackson-ignore-null-fields
本文链接:https://www.haomeiwen.com/subject/yrfxrhtx.html
网友评论