Jackson: avoid deserialization of some fields but not ignoring them
<p>i need to carry all the json data (to store them, log, return) but i will never access them from code. is there any way to avoid deserializing them but still use them during serialization?</p>

<pre><code>class MyObject {    
  int importantField; // i want this field to be properly deserialized
  String notImportantJsonGarbage; // i don't care what's here. it must be a valid json
}
</code></pre>

<p>So now i'd like to be able to deserialize it from</p>

<pre><code>{"importantField":7, "notImportantJsonGarbage":{"key1":3, "key2":[1,2,3]}}
</code></pre>

<p>and later serialize it to the same string</p>

<p><strong>UPDATE</strong></p>

<p>i don't want to ignore this property. i need this data. but as a string, not fully deserialized object</p>

<p>i need to be able to do:</p>

<pre><code>json1 -&gt; object -&gt; json2
json1 == json2
</code></pre>