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

  • SEARCH
  • Home
  • 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 6073851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:19:01+00:00 2026-05-23T10:19:01+00:00

after messing around with parsing a JSON response with GSON for a day, I

  • 0

after messing around with parsing a JSON response with GSON for a day, I finally figured out how to get my javabeans right in order to extract my data from the response. This is the layout of my nested classes and lists:

    public class LocationContainer {

    public class paging {
        private String previous;
        private String next;
    }


    private List<Datas> data;

    public class Datas {


        private String message;
        private String id;
        private String created_time;

        public class Tags {
            private List<Data> datas;
            public class Data {
                private String id;
                private String name;
            }

        }

        public class Application {

                private String id;
                private String name;

        }

        public class From {
            private String id;
            private String name;

        }

        public class Place {
            private String id;
            private String name;
            public class Location {
                private int longitude;
                private int latitude;
                        }


        }

    }

}

Now I am trying to get a hold of the name string inside the place class and the created_time string, but since I am quite a noob, I can’t seem to figure it out.

I was able to extract the created_time string by using

String time = gson.toJson(item.data.get(1).created_time);

However using

String name = gson.toJson(item.data.get(1).Place.name);

doesnt work.

The item class is an instance of LocationContainer filled with the output from GSON.
Any pointers would be greatly appreciated.

  • 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-23T10:19:01+00:00Added an answer on May 23, 2026 at 10:19 am

    created_time is a member variable of Data, so your first line is fine.

    However, Place is not a member variable, it’s just a class definition. You probably need to instantiate a member variable inside your Data class, e.g.:

    private Place place;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After perusing the web and messing around myself, I can't seem to convert a
i've been messing around trying figure this out myself but its taking a while..
I've just been messing around with threads in Java to get my head around
I just reinstalled IIS7.5 after a lot of ugly messing around. I admittedly had
After messing around a little with making a GUI with the Windows API, I
I am new to programming. I decided to stick with Python after messing around
I've been messing around with javascriptmvc. After getting data from the model, the view
I am messing around with some jquery trying to get to grips with it.
I'm a git noob, and after some tutorials and messing around I got some
lately I have been messing around with the Silverlight Business Application template to get

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.