title: using POJO Class with the GSON
body: <p>I am creating a project with a Json sample array I have generated POJO class and I have a JSON which I need to parse. I have done all the setup but the app is not showing any error and it's not showing any data inside the app. 
  here is my POJO Class generated.</p>
  
  <pre><code> public class Android {
  
  @SerializedName("ver")
  @Expose
  private String ver;
  @SerializedName("name")
  @Expose
  private String name;
  @SerializedName("api")
  @Expose
  private String api;
  
  public String getVer() {
      return ver;
  }
  
  public void setVer(String ver) {
      this.ver = ver;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  public String getApi() {
      return api;
  }
  
  public void setApi(String api) {
      this.api = api;
       }
  
       }
  
   public class    AndroidVersion {
  
  @SerializedName("android")
  @Expose
  private List&lt;Android&gt; android = null;
  
  public List&lt;Android&gt; getAndroid() {
      return android;
  }
  
  public void setAndroid(List&lt;Android&gt; android) {
      this.android = android;
  }
  
     }
  </code></pre>
  
  <p>And my Json be like</p>
  
  <pre><code>{
    "android": [
      {
        "ver": "1.5",
        "name": "Cupcake",
        "api": "API level 3"
      },
      {
        "ver": "1.6",
        "name": "Donut",
        "api": "API level 4"
      },
      {
        "ver": "2.0 - 2.1",
        "name": "Eclair",
        "api": "API level 5 - 7"
      }
    ]
  }
  </code></pre>
  
  <p>and i have parsed the data as shown below</p>
  
  <pre><code> private void getInformation(){
      StringRequest stringRequest=new StringRequest(Request.Method.GET, URL, new Response.Listener&lt;String&gt;() {
          @Override
          public void onResponse(String response) {
  
  
              Gson gson=new GsonBuilder().create();
              try {
                  JSONObject jsonObject=new JSONObject(response);
                  JSONArray jsonArray=jsonObject.getJSONArray("android");
                  Android averion= gson.fromJson(jsonObject.toString(),Android.class);
  
                  List&lt;Android&gt; verionlist=new ArrayList&lt;&gt;();
                  verionlist.add(averion);
                  adapter=new ReccyclerAdapter(verionlist);
                  recyclerView.setAdapter(adapter);
  
              } catch (JSONException e) {
                  e.printStackTrace();
              }
  
  
          }
      }, new Response.ErrorListener() {
          @Override
          public void onErrorResponse(VolleyError error) {
  
          }
      });
      MySingleton.getInstance(this).addToRequestQueue(stringRequest);
  }
  </code></pre>
  
  <p>can any one tell me what is the problem with my code. y its not showing the data.
  if you know any blog or a site to learn the about how to use the POJO with all type of JSON in android</p>
  
  <p>here is the adapter class.</p>
  
  <pre><code>    public class ReccyclerAdapter extends 
    RecyclerView.Adapter&lt;ReccyclerAdapter.MYViewHolder&gt; {
  private String TAG=getClass().getSimpleName();
  private List&lt;Android&gt; list=new ArrayList&lt;&gt;();
  ReccyclerAdapter(List&lt;Android&gt; list){
      this.list=list;
  
  }
  
  @NonNull
  @Override
  public MYViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
      View view=LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.data_row,viewGroup,false);
      return new MYViewHolder(view);
  }
  
  @Override
  public void onBindViewHolder(@NonNull MYViewHolder myViewHolder, int i) {
  
      myViewHolder.api_level.setText(list.get(i).getApi());
      myViewHolder.name.setText(list.get(i).getName());
      myViewHolder.version.setText(list.get(i).getVer());
  
  }
  
  
  @Override
  public int getItemCount() {
      return list.size();
  }
  public static class MYViewHolder extends RecyclerView.ViewHolder {
      TextView version,name,api_level;
      public MYViewHolder(@NonNull View itemView) {
          super(itemView);
          name=(TextView)itemView.findViewById(R.id.name);
          version=(TextView)itemView.findViewById(R.id.vesrion);
          api_level=(TextView)itemView.findViewById(R.id.api_level);
  
      }
  }
   }
  </code></pre>