title: Deserializing JSON string in android
body: <p>I have JSON String that read as below</p>
  
  <pre><code>{   "Status":"Clear",    "Class": [{  &lt;br&gt;
          {"name":"personA", "available" : 1}, &lt;br&gt;
         {"name":"personB", "available" : 0}, &lt;br&gt;
         {"name":"personC", "available" : 0}, &lt;br&gt;
          {"name":"personD", "available" : 1} &lt;br&gt;
           }] }
  </code></pre>
  
  <p>How do I deserialize the JSON String above? </p>
  
  <p>I got the idea of using JSONObject to take in whole JSON String into it but no idea how to get the arraylist of object (the list of Class object) and assign to a arraylist&lt;Class&gt;.</p>
  
  <p>Guidance and help are much appreciated.</p>
  
  <p><strong>UPDATED</strong> :<br></p>
  
  <p><strong><em>SOLVED AND SOLUTION SHOWN</em></strong></p>
  
  <p>I have solved this question but I think I have to explain how and why I used such solution.</p>
  
  <p>So to further explain my question, this is an json string that originally an object that got serialized and sent from a webservice to my apps. </p>
  
  <p>the original object is like this :</p>
  
  <pre><code> public class StatusJson
       {
           public String Status { get; set; }
           public List&lt;Class&gt; Class { get; set; }
       }
  </code></pre>
  
  <p>So what I have to do is just declare an exactly same class in my android then use this code</p>
  
  <pre><code>statusJson  statusJSON=g.fromJson(JSonString,StatusJson.class);
  </code></pre>
  
  <p>which will automatically parse the json string to the exact same class format.</p>
  
  <p>Hope this will help you guys too if you are directly sending a JSON serialized class like me. </p>