title: how to convert list into readable format
body: <p>When I execute this code, I get the solution. I need to convert the list into readable format. My Dao code is</p>
  
  <pre><code>    public List&lt;Data&gt; getData() {
      // TODO Auto-generated method stub
      System.out.println("In getData dao************");
      session=sessionFactory.openSession();
      tx=session.beginTransaction();
      List&lt;Data&gt; blist=session.createCriteria(&gt;.class).list();
      System.out.println("datalist dao************"+blist);
      tx.commit();
      session.close();
      return blist;
  }
  </code></pre>
  
  <p>Data.java</p>
  
  <pre><code>@Entity
  @Table(name="tbl_genere")
  public class Data implements Serializable{
  private static final long serialVersionUID = 1L;
  
  @Id
  @Column(name="dataid")
  private String DataId;
  
  @Column(name="dataname")
  private String DataName;
  
  public String getDataId() {
      return DataId;
  }
  
  public void setDataId(String dataId) {
      DataId = dataId;
  }
  
  public String getDataName() {
      return DataName;
  }
  
  public void setDataName(String dataName) {
      DataName = dataName;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I get the solution, but it's in unreadable format. How can I convert it to readable format? The answer is dao************[com.pack.web.model.Data@1233c96, com.pack.web.model.Data@5ec471]. But I need to store the list into a file as json format. How can I do this.</p>