title: dump object to String with Jackson
body: <p>I'm using Gson to generate debug ouput in my application</p>
  
  <pre><code>Gson gson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
  gson.toJson(myObject);
  </code></pre>
  
  <p>But Gson does complain about a circular reference error when attempting to serialize a data structure.
  Can this be done with Jackson library?</p>
  
  <p><strong>UPD</strong>
  Gson 2.3.1: Released Nov 20, 2014</p>
  
  <pre><code>Added support to serialize objects with self-referential fields. The self-referential field is set to null in JSON. Previous version of Gson threw a StackOverflowException on encountering any self-referential fields.
      The most visible impact of this is that Gson can now serialize Throwable (Exception and Error)
  </code></pre>