title: How serialize an object as a value to ObjectNode in Jackson?
body: <p>I'm using <code>jackson</code> to serialize my object as json. I'm using following code:</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  JsonNodeFactory nodeFactory = new JsonNodeFactory(false);
  ObjectNode resNode = new ObjectNode(nodeFactory);
  
  SimpleModule simpleModule = new SimpleModule();
  simpleModule.addSerializer(ApplicationVersion.class, new SingleApplicationSerializer());
  mapper.registerModule(simpleModule);
  JsonNode appObject = mapper.valueToTree(appVersion);
  
  resNode.put("status", true);
  resNode.put("appObject", appObject);     //This put method is deprecated.
  </code></pre>
  
  <p>But I saw the <code>put</code> method with <code>JsonNode</code> overload is deprecated.Why following overload of <code>put</code> method is deprecated:</p>
  
  <pre><code>public JsonNode put(String fieldName, JsonNode value);
  </code></pre>
  
  <p>What is the alternative for that?</p>
  
  <hr>
  
  <p>Also I tried this:</p>
  
  <pre><code>String jsonStr = mapper.writeValueAsString(appVersion);
  resNode.put("status", true);
  resNode.put("appObject", jsonStr);
  </code></pre>
  
  <p>But this method puts double quote (<code>"</code>) around <code>appObject</code> value as a string value.</p>