title: Setting Default value to a variable when deserializing using gson
body: <p>I am trying to convert <a href="http://www.json.org/">JSON</a> to Java object. When a certain value of a pair is <code>null</code>, it should be set with some default value.</p>
  
  <p>Here is my <a href="https://en.wikipedia.org/wiki/Plain_Old_Java_Object">POJO</a>:</p>
  
  <pre><code>public class Student {      
      String rollNo;
      String name;
      String contact;
      String school;
  
      public String getRollNo() {
          return rollNo;
      }
      public void setRollNo(String rollNo) {
          this.rollNo = rollNo;
      }
      public String getName() {
          return name;
      }
      public void setName(String name) {
          this.name = name;
      }
      public String getSchool() {
          return school;
      }
      public void setSchool(String school) {
          this.school = school;
      }
  }
  </code></pre>
  
  <p>Example JSON object:</p>
  
  <pre><code>{
    "rollNo":"123", "name":"Tony", "school":null
  }
  </code></pre>
  
  <p>So if school is <code>null</code>, I should make this into a default value, such as <code>"school":"XXX"</code>. How can I configure this with <a href="https://github.com/google/gson">Gson</a> while deserializing the objects?</p>