title: Serializing map using @JsonProperty
body: <p>I try to serialize an object that contains a <code>Map</code> using the <code>@JsonProperty</code> annotation, but when I tested it I saw that only the keys of the map are serialized. I looked it up but found no solution, what am I doing wrong?</p>
  
  <pre><code>public class People {
      private final Map&lt;Long,String&gt; idToNameMap;
  
      public People(@JsonProperty("idToNameMap") final Map&lt;Long,String&gt; idToNameMap) {
          this.idToNameMap = idToNameMap;
      }
  }
  
  
  public class PeopleTest {
  
      private static final long ID_1 = 111l;
      private static final long ID_2 = 222l;
      private static final String NAME_1 = "name1";
      private static final String NAME_2 = "name2";
  
      private final ObjectMapper mapper = new ObjectMapper();
  
      @Test
      public void testFromAndToJSON() throws Exception {
          Map&lt;Long,String&gt; idToNameMap = Maps.newHashMap();
          idToNameMap.put(ID_1,NAME_1);
          idToNameMap.put(ID_2,NAME_2);
          mapper.writeValueAsString(new People(idToNameMap));
      }
  }
  </code></pre>