Last active
January 21, 2020 14:31
-
-
Save panlw/b27cbda58c92bbac494e56093798be00 to your computer and use it in GitHub Desktop.
Deserialize immutable lombok annotated objects with jackson
This file contains 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
// https://www.baeldung.com/jackson-deserialize-immutable-objects | |
// https://stackoverflow.com/questions/49999492/immutable-lombok-annotated-class-with-jackson/50030088 | |
@Builder(builderClassName = "ValueObjectBuilder") | |
@JsonDeserialize(builder = ValueObject.ValueObjectBuilder.class) | |
@Value | |
@EqualsAndHashCode(of = {...}) | |
public class ValueObject { | |
@JsonPOJOBuilder(withPrefix = "") | |
@JsonIgnoreProperties(ignoreUnknown = true) | |
public static class ValueObjectBuilder { | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment