Skip to content

Commit

Permalink
Replace old deprecated and removed constant CAMEL_CASE_TO_LOWER_CASE_…
Browse files Browse the repository at this point in the history
…WITH_UNDERSCORES by new SNAKE_CASE constant to work with newer Jersey plugin (#1605) (#1606)
  • Loading branch information
bruderol authored Jan 3, 2024
1 parent e35be6d commit 317807f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class JacksonConfig implements ContextResolver<ObjectMapper> {
public ObjectMapper getContext(Class<?> type) {
return new ObjectMapper()
.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)
.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public final class JsonUtil {

private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()
.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)
.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true)
.configure(SerializationFeature.INDENT_OUTPUT, true)
Expand Down

0 comments on commit 317807f

Please sign in to comment.