title: Android java.util.hashmap cannot be cast to java.util.list
body: <p>I'm trying to retrieve data from a json with multiple values and cast it into a  listview but im gettting the error java.util.hashmap cannot be cast to java.util.list.</p>
  
  <p>I'm using volley.</p>
  
  <p>The FeedListActivity Class:</p>
  
  <pre><code> public void updateList() {
          feedListView= (ListView) findViewById(R.id.custom_list);
          feedListView.setVisibility(View.VISIBLE);
          progressbar.setVisibility(View.GONE);
  
          feedListView.setAdapter(new CustomListAdapter(this, feedList));
          feedListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id) {
                  Object o = feedListView.getItemAtPosition(position);
                  ClientesContatosModel newsData = (ClientesContatosModel) o;
  
                  Intent intent = new Intent(FeedListActivity.this, FeedDetailsActivity.class);
                  intent.putExtra("nome", newsData);
                  startActivity(intent);
              }
          });
      }
   JSONArray dados = json.getJSONArray("dados");
              // parsing json object
              for (int i = 0; i &lt; dados.length(); i++) {
  
                  JSONObject item = dados.getJSONObject(i);
  
                  feedList = new ArrayList&lt;ClientesModel&gt;();
                  ClientesModel mClientesModel = new ClientesModel();
                  ClientesContatosModel mClientesContatoModel = new ClientesContatosModel();
  
                  /* cadastra os dados necessários no objeto no modelo */
                  mClientesModel.setId(item.optInt("id"));
                  mClientesModel.setNome(item.optString("nome"));
                  mClientesModel.setTipo_pessoa(item.optString("tipo_pessoa"));
                  mClientesModel.setInformacoes_adicionais(item.optString("informacoes_adicionais"));
                  mClientesModel.setCpf(item.optString("cpf"));
                  mClientesModel.setCnpj(item.optString("cnpj"));
                  JSONArray contatos = item.getJSONArray("contatos");
                  for (int j = 0; j &lt; contatos.length(); j++) {
                      JSONObject data = contatos.getJSONObject(j);
  
                      mClientesContatoModel.setNome(data.optString("nome"));
                      mClientesContatoModel.setCargo(data.optString("cargo"));
  </code></pre>
  
  <p>FeedDetailsActivity class:</p>
  
  <pre><code>public class FeedDetailsActivity extends Activity {
  
      private ClientesContatosModel feed;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_feed_details);
  
          feed = (ClientesContatosModel) this.getIntent().getSerializableExtra("nome");
  
          if (null != feed) {
  
  
              TextView title = (TextView) findViewById(R.id.title);
              title.setText(feed.getNome());
  
  
          }
      }
  </code></pre>
  
  <p>Here is the Log:</p>
  
  <pre><code> java.lang.RuntimeException: Unable to start activity ComponentInfo{com.javatechig.feedreader/com.javatechig.feedreader.FeedDetailsActivity}: java.lang.ClassCastException: java.util.HashMap cannot be cast to com.javatechig.feedreader.model.ClientesContatosModel
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
                  at android.app.ActivityThread.access$800(ActivityThread.java:139)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5086)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                  at dalvik.system.NativeStart.main(Native Method)
  
  
  Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to com.javatechig.feedreader.model.ClientesContatosModel
                  at com.javatechig.feedreader.FeedDetailsActivity.onCreate(FeedDetailsActivity.java:26)
                  at android.app.Activity.performCreate(Activity.java:5248)
                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
                  at android.app.ActivityThread.access$800(ActivityThread.java:139)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5086)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
  </code></pre>