title: Serialize Set of UUID using Jackson
body: <p>I found that jackson comes equipped with a UUID serizlizer/deserializer that can be used like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Data
  @NoArgsConstructor
  public class MyClass {
  
      @JsonSerialize(using=UUIDSerializer.class)
      @JsonDeserialize(using=UUDIDeserializer.class)
      private UUID myUUID;
  
  }
  </code></pre>
  
  <p>And then using <code>ObjectMapper</code> on <code>MyClass</code> will correctly serialize/deserialize the <code>myUUID</code> field.</p>
  
  <p>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 cannot be converted to UUID (as I  half expected).</p>
  
  <p>I know I can create my own serializer/deserializers by extending <code>JsonSerializer</code>/<code>JsonDeserializer</code>, but this feels hacky. Is there another solution I can use? I also don't have the option to configure the <code>ObjectMapper</code> with my classes, since I don't have access to the <code>ObjectMapper</code>. I am using Amazon SWF and it automatically uses Jackson.</p>