title: Jackson: Deserializing a Set?
body: <p>When I attempt to deserialize:</p>
  
  <pre><code>{
    "tags": {}
  }
  </code></pre>
  
  <p>into:</p>
  
  <pre><code>public static class Foo
  {
      private final Set&lt;URI&gt; tags;
  
      /**
       * Creates a new Foo entity.
       * &lt;p/&gt;
       * @param tags the room tags
       * @throws NullPointerException if tags is null
       */
      @JsonCreator
      public Foo(@JsonProperty("tags") Set&lt;URI&gt; tags)
      {
          Preconditions.checkNotNull(tags, "tags may not be null");
  
          this.tags = ImmutableSet.copyOf(tags);
      }
  
      /**
       * @return the tags
       */
      public Set&lt;URI&gt; getTags()
      {
          return tags;
      }
  }
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.HashSet out of START_OBJECT token
   at [line: 1, column: 2]
  </code></pre>
  
  <p>Shouldn't this work out-of-the-box?</p>