title: What is the accepted practice for custom serialization in jackson?
body: <p>I'm trying to write custom serialization for an object in jackson and there seem to be many options, I'm wondering if one is generally preferred over the others.</p>
  
  <p>I've read about <code>JsonSerializableWithType</code>, and its deprecated sibling <code>JsonSerializable</code>. This seems good, since it doesn't require users of the class to register <code>Module</code>s in their <code>ObjectMapper</code>s. However I can't seem to resolve <code>JsonSerializableWithType</code> or find any examples of its usage. The fasterxml page that talks about it seems dated as well.</p>
  
  <p>The other option seems to be external serialization with <code>JsonSerializer</code>s. I've read about <code>@JsonSerialize</code>, but can't tell if it's better/worse/older/newer than <code>JsonSerializable</code>.</p>
  
  <p>Is there a compelling argument for either one of those over the other? Or is registering a <code>Module</code> to an <code>ObjectMapper</code> the most accepted way?</p>