Archive For 3. May 2016

Custom Jackson Annotations

By |

Custom Jackson Annotations

Jackson provides a feature to aggregate specific annotations together into one annotation. This becomes useful if the same annotations are copied over and over again for the same attribute along multiple classes: public class Message { @JsonProperty(“id”) @JsonDeserialize(using=IdTypeDeserializer.class) private String identifier; public String getIdentifier() { return identifier; } } The identifier attribute is mapped to…

Read more »