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 8947921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:53:12+00:00 2026-06-15T12:53:12+00:00

I had gone through a link on parsing Json data on Android, but didnt

  • 0

I had gone through a link on parsing Json data on Android, but didnt understand pretty much.
I am getting the following JSON String from my server.

I need to parse it and present it as a listview in my android app. ANy guidance or code snippet.?
Also since my Jason string has data for images, will the listview be able to display it properly?

My JSON String is:

{"results":{"result":[{"year":"2012","title":"The Amazing Spider-Man","details":"http:\/\/www.imdb.com\/title\/tt0948470","director":"Marc Webb","rating":"7.3","cover":"http:\/\/i.media-imdb.com\/images\/SF1f0a42ee1aa08d477a576fbbf7562eed\/realm\/feature.gif"},

{"year":"2014","title":"The Amazing Spider-Man 2","details":"http:\/\/www.imdb.com\/title\/tt0948470","director":"Marc Webb","rating":"7.3","cover":"http:\/\/ia.media-imdb.com\/images\/M\/MV5BMzk3MTE5MDU5NV5BMl5BanBnXkFtZTYwMjY3NTY3._V1._SX54_CR0,0,54,74_.jpg"},

{"year":"2002","title":"Spider-Man","details":"http:\/\/www.imdb.com\/title\/tt0948470","director":"Sam Raimi","rating":"6.3","cover":"http:\/\/ia.media-imdb.com\/images\/M\/MV5BODUwMDc5Mzc5M15BMl5BanBnXkFtZTcwNDgzOTY0MQ@@._V1._SX54_CR0,0,54,74_.jpg"},

{"year":"2007","title":"Spider-Man 3","details":"http:\/\/www.imdb.com\/title\/tt1872181","director":"Sam Raimi","rating":"7.5","cover":"http:\/\/ia.media-imdb.com\/images\/M\/MV5BMjE1ODcyODYxMl5BMl5BanBnXkFtZTcwNjA1NDE3MQ@@._V1._SX54_CR0,0,54,74_.jpg"},

{"year":"2004","title":"Spider-Man 2","details":"http:\/\/www.imdb.com\/title\/tt1872181","director":"Sam Raimi","rating":"6.8","cover":"http:\/\/i.media-imdb.com\/images\/SFa26455c07afc3c94f52e95de50d5d814\/realm\/tv_series.gif"}]}} 
  • 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-06-15T12:53:12+00:00Added an answer on June 15, 2026 at 12:53 pm

    Make Arraylist of All Fields and Write below function to parse above json, it will solve your problem.

    ArrayList<String> year, title, details, director, rating, cover;
    // For Parse Login Response From Server
    public void mParseResponse() throws UnknownHostException { 
    
        year=new ArrayList<String>();
        title=new ArrayList<String>();
        details=new ArrayList<String>();
        director=new ArrayList<String>();
        rating=new ArrayList<String>();
        cover=new ArrayList<String>();
    
        try {
            JSONObject jObject = new JSONObject(EntityUtils.toString(entity));
            JSONObject jsonobjresults = jObject.getJSONObject("results");
            JSONArray jsonarrayresult = jsonobjresults.getJSONArray("result");
            for(int i=0;i<jsonarrayresult.length(); i++){
                JSONObject mJsonObj = jsonarrayresult.getJSONObject(i);
                year.add(mJsonObj.getString("year"));
                title.add(mJsonObj.getString("title"));
                details.add(mJsonObj.getString("details"));
                director.add(mJsonObj.getString("director"));
                rating.add(mJsonObj.getString("rating"));
                cover.add(mJsonObj.getString("cover"));
            }
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had gone through the tutorial in Prestashop at http://forge.prestashop.com:8081/display/PS14/Using+the+REST+webservice but it doesn't guide
I had gone through many solutions for the above problem but they are quite
I gone through the MSDN Document, and found the following : - But they
i want to generate Key Keypresses programmatically in android. i had gone through sample
Had a good read through similar topics but I can't quite a) find one
Having had some Sql Compact db corruption issues in the past and gone through
Having just gone through a small experimenting session to try to see how much
You must had gone through this before coming to my this question. How to
I had recently starting learning openGLES and right now I had gone through some
How can we set HTTP referer in embedded UIWebView? I had gone through this

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.