title: Convert Java objects to JSON strings using gson
body: <p>I've found some example here which says how to convert json to java object but here I need to convert Java object to <code>GSON</code></p>
  
  <p>I have a Java object and now I want to convert the Java object to Gson. How can I achieve this, please refer my code.</p>
  
  <pre><code>Staff obj = new Staff();
  Gson gson = new Gson();
  </code></pre>
  
  <p>I need to convert staff object to gson object</p>
  
  <p>This is my staff class</p>
  
  <pre><code>public class Staff {    
      private String name;
      private int age;
      private String position;
      private BigDecimal salary;
      private List&lt;String&gt; skills;
  </code></pre>
  
  <p>How can I go about this?</p>