title: Dynamically enable/disable he UNWRAP_ROOT_VALUE and WRAP_ROOT_VALUE in Jackson's ObjectMapper?
body: <p>Is there a way to enable/disable the <code>UNWRAP_ROOT_VALUE</code> and <code>WRAP_ROOT_VALUE</code> in Jackson's <code>ObjectMapper</code> dynamically.<br>
  I have to enable/disable these properties depending on what service is called, some requests require a <code>JsonRootName</code> and some do not. </p>
  
  <p>I have the <code>@JsonRootName</code> annotation in the classes that do require it.<br>
  I have a custom <code>ObjectMapper</code> class that extends the Jackson Object mapper.<br>
  I am calling a method to enable/disable the properties depending on what service is called but is it doesn't seem to be working.</p>
  
  <pre><code>public void setWrapValue(boolean wrap) {
  
      final AnnotationIntrospector introspector = new JacksonAnnotationIntrospector();     
  
      this.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.UNWRAP_ROOT_VALUE, wrap);
  
      this.configure(org.codehaus.jackson.map.SerializationConfig.Feature.WRAP_ROOT_VALUE, wrap);
      this.setDeserializationConfig(this.getDeserializationConfig().withAnnotationIntrospector(introspector));
  
      this.setSerializationConfig(this.getSerializationConfig().withAnnotationIntrospector(introspector));
   }
  </code></pre>