title: How to serialize with Jackson a java.util.Map based class
body: <p>I have a class which looks like this:</p>
  
  <pre><code>@JsonFormat(shape=JsonFormat.Shape.OBJECT)
  public class MyMap implements Map&lt;String, String&gt;
  {
      protected Map&lt;String, String&gt; myMap = new HashMap&lt;String, String&gt;();
  
      protected String myProperty = "my property";
      public String getMyProperty()
      {
          return myProperty;
      }
      public void setMyProperty(String myProperty)
      {
          this.myProperty = myProperty;
      }
  
      //
      // java.util.Map mathods implementations
      // ...
  }
  </code></pre>
  
  <p>And a main method with this code:</p>
  
  <pre><code>            MyMap map = new MyMap();
              map.put("str1", "str2");
  
              ObjectMapper mapper = new ObjectMapper();
              mapper.getDeserializationConfig().withAnnotationIntrospector(new JacksonAnnotationIntrospector());
              mapper.getSerializationConfig().withAnnotationIntrospector(new JacksonAnnotationIntrospector());
              System.out.println(mapper.writeValueAsString(map));
  </code></pre>
  
  <p>When executing this code I'm getting the following output: {"str1":"str2"}</p>
  
  <p>My question is why the internal property "myProperty" is not serialized with the map?
  What should be done to serialize internal properties? </p>