Replace deprecated setSerializationInclusion with setDefaultPropertyInclusion in JsonConf.
This commit is contained in:
1 parent
7b83b99cf1
commit
2b359cbd88
1 file changed
+1
-1
@@ -18,7 +18,7 @@ class JsonConf {
|
||||
static ObjectMapper initObjectMapper() {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.registerModule(new JavaTimeModule());
|
||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
mapper.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
||||
return mapper;
|
||||
|
||||
Reference in new issue
Block a user