Serialize Set of UUID using Jackson
问题 I found that jackson comes equipped with a UUID serizlizer/deserializer that can be used like this: @Data @NoArgsConstructor public class MyClass { @JsonSerialize(using=UUIDSerializer.class) @JsonDeserialize(using=UUDIDeserializer.class) private UUID myUUID; } And then using ObjectMapper on MyClass will correctly serialize/deserialize the myUUID field. However, my class has a set of UUIDs that I want to serialize. I tried annotating the field the same way as above, but it complains that Set