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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:40:35+00:00 2026-06-15T14:40:35+00:00

I have a large json page which contains url:http://akhilmadanan.tk/Akhil/database.php. While i am parsing this

  • 0

I have a large json page which contains url:http://akhilmadanan.tk/Akhil/database.php.
While i am parsing this page using normal json parsing method it shows “OutOfMemoryError”. For this i heard about GSON. Please any body help me get how to read the datas from below page using GSON.
any tutorial?

  • 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-15T14:40:37+00:00Added an answer on June 15, 2026 at 2:40 pm

    You can definitely go to links provided by others which are helpful

    For brief you can add GSON library in your lib folder.
    and use like this.

    Gson gson=new Gson();
    

    To get object from json

    Model model=gson.fromJson(json,Model.class);
    

    To convert to json

    String json=gson.toJson(model);
    

    I run your code and there are 3010 items of object

    [
    {
    "cust_no":"70105615002",
    "cust_name":"akhil",
    "address":"kajffjkhfhhkjsd",
    "area":"58695",
    "ranges":"4586",
    "plot":"69896",
    "multifactor":"85758",
    "electricity_meterno":"7895",
    "water_meterno":"69358",
    "gas_metrno":"78956",
    "traffic_code":"4587855",
    "last_meter":"58695",
    "previous_reading":"25638",
    "date":"589687",
    "current_usage":"789654",
    "current_balance":"45876",
    "last_recipt":"236584"
    },....
    

    Now make a model equivalent to above name like

    @SerializedName("cust_no")
    private Long custNo;
    
    @SerializedName("cust_name")
    private Long custName;
    
    ..........
    

    remember to add one list of same class type like

     @SerializedName("custname")
    private List<Customer> customerList;
    

    and generate getters and setters of that Customer class;

    after this

    parse your data like this

    CustomerModel customerModel=gson.fromJson(json,Customer.class);

    you get all your data in customerModel;

    To access data just use list of that class.

    List<Customer> customerList=customerModel.getCustomerList();
    
    Log.v("APP_NAME",""+customerList.size());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this json page: https://www.googleapis.com/books/v1/volumes?q=9789264187061 which looks like this: { kind: books#volumes, totalItems:
I have large json data which is contains hundreds thousands elements, now i need
I have a large JSON file that contains A LOT of similar code. It's
I have a javascript rich page that is passing a large JSON formatted to
I have fairly large set of data returned via AJAX from a page. This
I have a large json data object (over 300K uncompressed, 40K gzipped) which is
How to store large JSON String in cookie ? I have to use cookie
I have large database table, approximately 5GB, now I wan to getCurrentSnapshot of Database
I have large amounts of data formatted in JSON formats, I recently scripted the
I have a large XML file (converted to JSON) that consists of multiple repeating

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.