title: Jax rs - PATCH method behaviour with null values
body: <p>I have a REST web app java EE8 application.</p>
  
  <p>Let's say I have this:</p>
  
  <pre><code>class PersonRequest {
       String email;
       String name;
       String surname;
       String mobile;
  
       .. getter and setter
  }
  </code></pre>
  
  <p>I want to create a resourche method that updates ONLY requested properties, therefore I use PATCH method.</p>
  
  <p>A JSON request example:</p>
  
  <pre><code>PATCH
  {
      "mobile": "+3494441122" // update only mobile
  }
  </code></pre>
  
  <p>Will modify only mobile field and leave other fields untouched.</p>
  
  <p><strong>THE ISSUE</strong></p>
  
  <p>How to deal with <em>null</em> values with PATCH method ? </p>
  
  <p>Should I consider to turn blank the field or just ignore it ?</p>
  
  <p>I'm worried about the the first case as I don't know if is there any way to recognize the difference, because either if I don't pass the field or i specify the null value, the Person's property field will be a <em>null</em> value.</p>
  
  <p>Any hints?</p>