Created
May 16, 2020 11:56
-
-
Save ajermakovics/c47a6704fe010aeb8ecba6bfe3f0b7b8 to your computer and use it in GitHub Desktop.
Jackson ObjectMapper Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final static ObjectMapper mapper = new ObjectMapper() | |
.findAndRegisterModules() | |
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) | |
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false) | |
.configure(SerializationFeature.INDENT_OUTPUT, true) | |
.configure(Feature.ALLOW_COMMENTS, true) | |
.configure(Feature.ALLOW_SINGLE_QUOTES, true) | |
.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true) | |
.configure(Feature.ALLOW_YAML_COMMENTS, true) | |
.configure(Feature.ALLOW_UNQUOTED_CONTROL_CHARS, true) | |
.setSerializationInclusion(JsonInclude.Include.NON_NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment