title: Serialize class with generic to JSON using Jackson
body: <p>I have a structure of objects representing a Questionnaire and I need to serialize to JSON. 
  One class of the structure is a OpenQuestion and this class use generics with two parameters.
  The problem starts when one of types used was Date, the date is serialized wrong, like a long.</p>
  
  <p>Class code: </p>
  
  <pre><code>public class OpenQuestion &lt;valueType,validationType&gt; extends AbstractQuestion implements    Serializable {
      private valueType value;
      private validationType minValue;
      private validationType maxValue;
      ...
  }
  </code></pre>
  
  <p>I saw how to serialize a date in a hash map if the hash map always uses a Date, but in this case I use the class with String, Integer or Date. </p>
  
  <p>Any idea to solve it?
  Thanks</p>