title: Jackson's @JsonAppend with default value
body: <p>guys! I am developing a web application and I decided to use Jackson as my JSON processing framework. </p>
  
  <p>In request data that I am willing to send; let's say the POJO looks like this:</p>
  
  <pre><code>data class JSONEnvelope(
          @JsonProperty("obj1")
          val obj1: Obj1,
  
          @JsonProperty("obj2")
          val obj2: Obj2)
  </code></pre>
  
  <p>which get serialized like this:</p>
  
  <pre><code>{
      "obj1":{...},
      "obj2":{...}
  }
  </code></pre>
  
  <p>but I need to add some metadata to that object, let's say fields <code>meta1</code> and <code>meta</code>. I thought that <code>@JsonAppend</code> would solve my problem, but I am using Jackson together with Jersey, so I am not serializing objects manually, so I cannot use <code>writer.withAttribute("...", ...)</code>.</p>
  
  <p>I am aware of <a href="https://stackoverflow.com/questions/14714328/jackson-how-to-add-custom-property-to-the-json-without-modifying-the-pojo">this thread</a>, but there is no answer that kinda satisfy my needs, because I think, that writing a custom serializer is a bit overkill for this, moreover if I do not have a mechanism to "serialize the rest of the original object". I'd be glad for any ideas</p>