//version 8: Jackson deps are at least Java7+. import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import lombok.Builder; import lombok.Singular; import lombok.extern.jackson.Jacksonized; @Jacksonized @Builder public class JacksonBuilderSingular { @JsonAnySetter @Singular("any") private Map any; @JsonProperty("v_a_l_u_e_s") @Singular private List values; @JsonAnySetter @Singular("guavaAny") private ImmutableMap guavaAny; @JsonProperty("guava_v_a_l_u_e_s") @Singular private ImmutableList guavaValues; }