title: Gson : Iterating over fromJson result
body: <p>Language: Java and Gson</p>
  
  <p>Having parsed a JSON array, how do I:</p>
  
  <p>1) Print all of its contents</p>
  
  <p>2) Iterate over its contents?</p>
  
  <p>For example, here's my code:</p>
  
  <pre><code>String JSInput = "//Json String";
  Type listType = new TypeToken&lt;TabClass[]&gt;() {}.getType();
  Input_String =GsonObject.fromJson(JSInput, listType);
  System.out.println(Input_String.toString());
  </code></pre>
  
  <p>And the corresponding class description is :</p>
  
  <pre><code>class TabClass{
  String Name;
  String Parent;
  public String getName() {
      return Name;
  }
  public String getParent() {
      return Parent;
  }
  public void setName(String Name) {
      this.Name = Name;
  }
  public void setParent(String Parent) {
      this.Parent = Parent;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The above code only returns a description of the object along with its memory location:</p>
  
  <pre><code>[Lcom.example.projectname.TabClass;@1fbfd6
  </code></pre>
  
  <p>How do I print the contents of the resultant object, or Iterate over it? </p>