title: Jackson JsonCreator not working in Enum
body: <pre><code>import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonFormat;
  import com.fasterxml.jackson.annotation.JsonProperty;
  
  @JsonFormat(shape = JsonFormat.Shape.OBJECT)
  public enum Option {
      ADDRESS("address"),
      TELEPHONE("telephone");
  
      private String value;
  
      Option(String value) {
          this.value = value;
      }
  
      @JsonProperty
      public String getValue() {
          return value;
      }
  
      @JsonCreator
      public static Option forValue(@JsonProperty("value") String value) {
          for (Option o: Option.values()) {
              if (o.value.equals(value)) {
                  return o;
              }
          }
          throw new IllegalArgumentException("Invalid value: " + value);
      }
  }
  </code></pre>
  
  <p>Given the JSON input:</p>
  
  <pre><code>{
      "value":"address"
  }
  </code></pre>
  
  <p>I would expect to get back an ADDRESS enum, but this is not working, instead if i do a:</p>
  
  <pre><code>@JsonCreator
  public static Option forValue(@JsonProperty("value") String value) {
      System.out.println(value);
      ...
  }
  </code></pre>
  
  <p>I get back a single bracket "{" character only (printed to the console).
  What is wrong?</p>
  
  <p>EDIT:</p>
  
  <p>I do that using JAX-RS and Resteasy on Wildfly</p>
  
  <pre><code>@Path("/plans")
  @Consumes(MediaType.APPLICATION_JSON)
  @Produces(MediaType.APPLICATION_JSON)
  public class PlanRESTService {    
  
      @POST
      @Path("/{id:\\d+}/options")
      public Response createPlanOption(@PathParam("id") Long id, Option option) {
          ...
          return Response.ok().build();
      }
  </code></pre>
  
  <p>Registered Jackson provider:</p>
  
  <pre><code>@Provider
  public class JacksonContextResolver implements ContextResolver&lt;ObjectMapper&gt; {
  
      private ObjectMapper objectMapper;
  
      public JacksonContextResolver() {
          this.objectMapper = new ObjectMapper();
      }
  
      @Override
      public ObjectMapper getContext(Class&lt;?&gt; aClass) {
          return objectMapper;
      }
  }
  </code></pre>