How to parse JSON with Retrofit and display it?
<p>I am facing a problem with parsing JSON using Retrofit. </p>

<p>This is my JSON:</p>

<pre><code>{
    "page": 1,
    "limit": 10,
    "explicit": false,
    "has_more": true,
    "list": [
        {
            "id": "x4wqlq6",
            "title": "Xavier Mignot : « Il nous manque toujours des points »",
            "created_time": 1476019523,
            "thumbnail_medium_url": "http://s2.dmcdn.net/c2Vct/160x120-gDr.jpg"
        },
        {
            "id": "x4wq5k7",
            "title": "David Mélé : « Cette victoire fait du bien dans les têtes de tout le monde »",
            "created_time": 1476001049,
            "thumbnail_medium_url": "http://s1.dmcdn.net/c2CqJ/160x120-Aj4.jpg"
        },
        …
    ]
}
</code></pre>

<p>I would like to display the title, the id, and the link.</p>

<p>My Video model:</p>

<pre><code>public class Video {

    @SerializedName("list")
    @Expose
    private List list;

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public class List {

        @SerializedName("id")
        @Expose
        private String id;
        @SerializedName("title")
        @Expose
        private String title;
        @SerializedName("created_time")
        @Expose
        private String created_time;
        @SerializedName("thumbnail_medium_url")
        @Expose
        private String thumbnail_medium_url;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
        public String getTitle() {
            return title;
        }
        public void setTitle(String title) {
            this.title = title;        }
        public String getCreated_time() {
            return created_time;
        }

        public void setCreated_time(String created_time) {
            this.created_time = created_time;
        }

        public String getThumbnail_medium_url() {
            return thumbnail_medium_url;
        }

        public void setThumbnail_medium_url(String thumbnail_medium_url) {
            this.thumbnail_medium_url = thumbnail_medium_url;
        }
    }
}
</code></pre>

<p>Here is the main class: </p>

<pre><code>public class Videos extends MainActivity{

    private ListView listView;
    private View parentView;
    private ArrayList&lt;Video&gt; videoList;
    private CustomListViewAdapterV adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_videos);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        videoList = new ArrayList&lt;&gt;();
        parentView = findViewById(R.id.parentLayout);
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawer.setDrawerListener(toggle);
        toggle.syncState();
        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
        navigationView.setNavigationItemSelectedListener(this);
        listView = (ListView) findViewById(R.id.list1);
        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                Snackbar.make(parentView, videoList.get(position) + " =&gt; " + videoList.get(position), Snackbar.LENGTH_LONG).show();
                // a revoirr
                /*String url = alist.get(position).getThumbnail_medium_url();
                Intent i = new Intent(Videos.this,  daylimotion.class);
                i.putExtra("url", url);
                startActivity(i);*/
            }
        });
        Toast toast = Toast.makeText(getApplicationContext(), R.string.string_click_to_load, Toast.LENGTH_LONG);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        assert fab != null;
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(@NonNull final View view) {
                /**
                 * Checking Internet Connection
                 */
                if (InternetConnection.isNetworkAvailable(getApplicationContext())) {
                    final ProgressDialog dialog;
                    /**
                     * Progress Dialog for User Interaction
                     */
                    dialog = new ProgressDialog(Videos.this);
                    dialog.setTitle(getString(R.string.string_getting_json_title));
                    dialog.setMessage(getString(R.string.string_getting_json_message));
                    dialog.show();

                    //Creating an object of our api interface
                    ApiInterface api = ApiClientV.getApiInterface();
                    /**
                     * Calling JSON
                     */
                    Call&lt;VideoList&gt; call = api.getJsn();
                    /**
                     * Enqueue Callback will be call when get response...
                     */
                    call.enqueue(new Callback&lt;VideoList&gt;() {
                        @Override
                        public void onResponse(Call&lt;VideoList&gt; call, Response&lt;VideoList&gt; response) {
                            //Dismiss Dialog
                            dialog.dismiss();
                            if(response.isSuccessful()) {
                                /**
                                 * Got Successfully
                                 */

                               videoList = response.body().getList();


                                /**
                                 * Binding that List to Adapter
                                 */
                                adapter = new CustomListViewAdapterV(Videos.this, videoList);
                                listView.setAdapter(adapter);

                            } else {
                                Snackbar.make(parentView, R.string.string_some_thing_wrong, Snackbar.LENGTH_LONG).show();
                            }
                        }

                        @Override
                        public void onFailure(Call&lt;VideoList&gt; call, Throwable t) {
                            dialog.dismiss();
                        }
                    });
                } else {
                    Snackbar.make(parentView, R.string.string_internet_connection_not_available, Snackbar.LENGTH_LONG).show();
                }
            }
        });
</code></pre>

<p>This is the <code>VideoList</code> class. It's for calling JSON. It's using in the videos ( the main):</p>

<pre><code>public class VideoList {

    @SerializedName("list")
    @Expose
    private ArrayList&lt;Video&gt; list = new ArrayList&lt;&gt;();
    public ArrayList&lt;Video&gt; getList() {
        return list;
    }

}
</code></pre>

<p>After we found the adapter, the application hung in this part of codes. Exactly in <code>vh.textViewTitle.setText(item.getList().getTitle())</code> this variable still null :( </p>

<pre><code>public class CustomListViewAdapterV extends ArrayAdapter&lt;Video&gt; {

    List&lt;Video&gt; videoList;
    Context context;
    private LayoutInflater mInflater;

    // Constructors
    public CustomListViewAdapterV(Context context, ArrayList&lt;Video&gt; objects) {
        super(context, 0, objects);
        this.context = context;
        this.mInflater = LayoutInflater.from(context);
        videoList = objects;
    }


    @Override
   public Video getItem(int position) {
       return videoList.get(position);
   }


    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final ViewHolder vh;
        if (convertView == null) {
            View view = mInflater.inflate(R.layout.list_item_videos, parent, false);
            vh = ViewHolder.create((RelativeLayout) view);
            view.setTag(vh);
        } else {
            vh = (ViewHolder) convertView.getTag();
        }

        Video item = getItem(position);
        vh.textViewTitle.setText(item.getList().getTitle());
        vh.textViewCreated_time.setText(item.getList().getCreated_time());
        vh.textViewId.setText(item.getList().getId());
        Picasso.with(context).load(item.getList().getThumbnail_medium_url()).placeholder(R.mipmap.ic_launcher).error(R.mipmap.ic_launcher).into(vh.imageView);

        return vh.rootView;
    }

    private static class ViewHolder {
        public final RelativeLayout rootView;
        public final ImageView imageView;
        public final TextView textViewTitle;
        public final TextView textViewCreated_time;
        public final TextView textViewId;
        private ViewHolder(RelativeLayout rootView,  ImageView imageView, TextView textViewTitle, TextView textViewCreated_time, TextView textViewId) {
           this.rootView = rootView;
            this.imageView = imageView;
            this.textViewTitle = textViewTitle;
            this.textViewCreated_time = textViewCreated_time;
            this.textViewId = textViewId;
        }

        public static ViewHolder create(RelativeLayout rootView) {
           ImageView imageView = (ImageView) rootView.findViewById(R.id.imageView);
            TextView textViewTitle = (TextView) rootView.findViewById(R.id.textViewTitle);
            TextView textViewCreated_time = (TextView) rootView.findViewById(R.id.textViewCreated_time);
            TextView textViewId = (TextView) rootView.findViewById(R.id.textViewId);
            return new ViewHolder(rootView, imageView, textViewCreated_time,  textViewTitle, textViewId);
        }
    }
}
</code></pre>

<p>Could someone please help explain why the application is hanging? </p>