Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5983433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:13:48+00:00 2026-05-22T22:13:48+00:00

I’ve got somthing to parse with Gson, but Gson recognize only json object and

  • 0

I’ve got somthing to parse with Gson, but Gson recognize only json object and array. But i’ve got something like this:

"results":[
    {
        "nyt_movie_id":135855,
        "display_title":"Big Night",
        "sort_name":"Big Night",
        "mpaa_rating":"R",
        "critics_pick":1,
        "thousand_best":"1",
        "byline":"Janet Maslin",
        "headline":"",
        "capsule_review":"Restaurateur brothers stake all on one dinner. Succulent comedy.",
        "summary_short":"",
        "publication_date":"1996-03-29",
        "opening_date":"1996-09-20",
        "dvd_release_date":"1998-04-07",
        "date_updated":"2010-08-25 14:47:08",
        "seo_name":"Big-Night",
        "link":{
            "type":"article",
            "url":"http:\/\/movies.nytimes.com\/movie\/review?res=9501E6DA1539F93AA15750C0A960958260",
            "suggested_link_text":"Read the New York Times Review of Big Night"
        },
        "related_urls":[
            {
                "type":"overview",
                "url":"http:\/\/movies.nytimes.com\/movie\/135855\/Big-Night\/overview",
                "suggested_link_text":"Overview of Big Night"
            },
            {
                "type":"showtimes",
                "url":"http:\/\/movies.nytimes.com\/movie\/135855\/Big-Night\/showtimes",
                "suggested_link_text":"Tickets & Showtimes for Big Night"
            },
            {
                "type":"awards",
                "url":"http:\/\/movies.nytimes.com\/movie\/135855\/Big-Night\/details",
                "suggested_link_text":"Cast, Credits & Awards for Big Night"
            },
            {
                "type":"community",
                "url":"http:\/\/movies.nytimes.com\/movie\/135855\/Big-Night\/rnr",
                "suggested_link_text":"Readers' Reviews of Big Night"
            },
            {
                "type":"trailers",
                "url":"http:\/\/movies.nytimes.com\/movie\/135855\/Big-Night\/trailers",
                "suggested_link_text":"Trailers & Clips for Big Night"
            }
        ]
    }

My app crashes at “link” because i wanted to make it like List links;
with class Links looking like this:

private String type;
public void setType();

ect
Can you help me?

My Result class looks like this:

package com.galite.nyt;

import java.util.List;

public class Results {
    private int movie_id;
    private String display_title;
    private String sort_name;
    private String mpaa_rating;
    private String critics_pick;
    private String byline;
    private String headline;
    private String capsule_review;
    private String summary_short;
    private String publication_date;
    private String opening_date;
    private String dvd_release_date;
    private String date_updated;
    private List<RelatedUrl> related_url;
    private String article;
    private String url;
    private String suggest_link_text;
    //private List<Link> link;

    public Results(){

    }
    //Setters
    public void setMovieId(int mi){
        movie_id = mi;
    }
    public void setDisplayTitle(String dp){
        display_title = dp;
    }
    public void setSortName(String sn){
        sort_name = sn;
    }
    public void setMpaaRating(String mr){
        mpaa_rating = mr;
    }
    public void setCriticsPick(String cp){
        critics_pick = cp;
    }
    public void setByline(String b){
        byline = b;
    }
    public void setHeadline(String h){
        headline = h;
    }
    public void setCapsuleReview(String cr){
        capsule_review = cr;
    }
    public void setSummaryShort(String ss){
        summary_short = ss;
    }
    public void setPublicationDate(String pd){
        publication_date = pd;
    }
    public void setOpeningDate(String op){
        opening_date = op;
    }
    public void setDvdReleaseDate(String drd){
        dvd_release_date = drd;
    }
    public void setDateUpdated(String du){
        date_updated = du;
    }
    public void setRelatedUrl(List<RelatedUrl> ru){
        related_url = ru;
    }
    //public void setLink(List<Link> l){
    //  link = l;
    //}

    //Getters
    public int getMovieId(){
        return movie_id;
    }
    public String getDisplayTitle(){
        return display_title;
    }
    public String getSortName(){
        return sort_name;
    }
    public String getMpaaRating(){
        return mpaa_rating;
    }
    public String getCriticsPick(){
        return critics_pick;
    }
    public String getByline(){
        return byline;
    }
    public String getHeadline(){
        return headline;
    }
    public String getCapsuleReview(){
        return capsule_review;
    }
    public String getSummaryShort(){
        return summary_short;
    }
    public String getPublicationDate(){
        return publication_date;
    }
    public String getOpeningDate(){
        return opening_date;
    }
    public String getDvdReleaseDate(){
        return dvd_release_date;
    }
    public String getDateUpdated(){
        return date_updated;
    }
    public List<RelatedUrl> getRelatedUrl(){
        return related_url;
    }
    //public List<Link> getLink(){
    //  return link;
    //}
    //Setters
    public void setArticle(String a){
        article=a;
    }
    public void setUrl(String u){
        url = u;
    }
    public void setSuggestLinkText(String s){
        suggest_link_text = s;
    }

    //Getters
    public String getArticle(){
        return article;
    }
    public String getUrl(){
        return url;
    }
    public String getSuggestLinkText(){
        return suggest_link_text;
    }
}

and my link class looks like this:

package com.galite.nyt;

public class Link {
    private String article;
    private String url;
    private String suggest_link_text;
    public Link(){

    }

    //Setters
    public void setArticle(String a){
        article=a;
    }
    public void setUrl(String u){
        url = u;
    }
    public void setSuggestLinkText(String s){
        suggest_link_text = s;
    }

    //Getters
    public String getArticle(){
        return article;
    }
    public String getUrl(){
        return url;
    }
    public String getSuggestLinkText(){
        return suggest_link_text;
    }
}

Like you can see i put List links in comments because it was the problem i received.
And i tried to pass link directly in the Results class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:13:50+00:00Added an answer on May 22, 2026 at 10:13 pm

    Okay the problem was “link”, it’s not an array . What you need to do is keep the Link class but in the Results class add:

       private Link link;
    
       public Link getLink(){
           return link;
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I have some data like this: 1 2 3 4 5 9 2 6
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.