title: why to use MappingJacksonValue on spring boot
body: <p>I am seeing some of the rest services returning response as below</p>
  
  <pre><code>MappingJacksonValue result= new MappingJacksonValue(resultPojo);
  return  ResponseEntity.status(HttpStatus.OK).body(result);
  </code></pre>
  
  <p>and for error</p>
  
  <pre><code> return  ResponseEntity.status(HttpStatus.NOT_FOUND).body(new MappingJacksonValue("Error Message..."));
  </code></pre>
  
  <p>What is the use of wrapping object inside <code>MappingJacksonValue</code> if we can simply do something as below</p>
  
  <pre><code>return  ResponseEntity.status(HttpStatus.OK).body(resultPojo);
  
  return  ResponseEntity.status(HttpStatus.NOT_FOUND).body("Error Message...");
  </code></pre>
  
  <p>I see we can use filter options by using <code>MappingJacksonValue</code>, but if we are not using that, what is the benefit of using <code>MappingJacksonValue</code>.</p>
  
  <p><strong>Note</strong></p>
  
  <p>I am using <code>Spring boot</code>.</p>