title: Serializing instants to milliseconds using Jackson?
body: <p>Using Jackson 2.8.3 and java 8, if I attempt to serialize any <code>Instant</code> fields, they seem to get serialized as seconds instead of milliseconds.</p>
  
  <p>This is different from how Jackson serializes <code>Date</code>s, which get serialized to milliseconds. But instants get serialized to seconds, with a fractional part.</p>
  
  <p>How can I change this, and have Jackson serialize instants to unix epoch milliseconds as well?</p>
  
  <p>I am doing the following:</p>
  
  <pre><code>mapper.enable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);                 
  mapper.enable(SerializationFeature.WRITE_DATE_KEYS_AS_TIMESTAMPS);               
  mapper.disable(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS);
  </code></pre>
  
  <p>But it isn't having any effect.</p>