private List<Movie> deserialize(String json) {
        List<Movie> movies = new ArrayList<>();
        try {
            JSONObject response = new JSONObject(json);
            JSONArray movieObjects = response.getJSONArray("movies");
            for (int i = 0; i < movieObjects.length(); i++) {
                JSONObject object = movieObjects.getJSONObject(i);
                Movie movie = new Movie();
                movie.setTitle(object.getString("title"));
                movie.setYear(object.getInt("year"));
                movie.setMpaaRating(object.getString("mpaa_rating"));
                try {
                    movie.setCriticsConsensus(object.getString("critics_consensus"));
                } catch (JSONException e) {
                }
                try {
                    movie.setReleaseDate(object.getJSONObject("release_dates").getString("theater"));
                } catch (JSONException e) {
                }
                Rating rating = new Rating();
                JSONObject r = object.getJSONObject("ratings");
                try {
                    rating.setAudienceRating(r.getString("audience_rating"));
                } catch (JSONException e) {
                }
                try {
                    rating.setAudienceScore(r.getInt("audience_score"));
                } catch (JSONException e) {
                }
                try {
                    rating.setCriticsRating(r.getString("critics_rating"));
                } catch (JSONException e) {
                }
                try {
                    rating.setCriticsScore(r.getInt("critics_score"));
                } catch (JSONException e) {
                }
                movie.setRatings(rating);
                movie.setSynopsis(object.getString("synopsis"));
                movie.setThumbnail(object.getJSONObject("posters").getString("thumbnail"));
                movie.setImage(object.getJSONObject("posters").getString("detailed"));
                movies.add(movie);
            }
        } catch (JSONException e) {
        }
        return movies;
    }