title: Custom JSON fields with Jackson in response
body: <p>I have some RESTful WS created with Spring Boot and one of some endpoint's methods returns instance of some class which will be converted then into JSON using embedded Jackson library. Jackson converts to JSON every field, even if some fields are null. So in the output it will look like:</p>
  
  <pre><code>{
      "field1": "res1",
      "field2": "res2",
      "field3": null
  }
  </code></pre>
  
  <p>I want to ignore some field it the output in particular cases. Not everytime, at some cases. How to do it?</p>