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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:57:03+00:00 2026-05-25T05:57:03+00:00

I have some information that needs to be stored in internal memory. I will

  • 0

I have some information that needs to be stored in internal memory. I will like to store in the form of key-value pairs the way its done in SharedPreferences. I was thinking of creating JsonObject and saving and retrieving in that way. Is there any other way that we can save the data in internal memory in the form of key-value pairs?

  • 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-25T05:57:04+00:00Added an answer on May 25, 2026 at 5:57 am

    Th standard java way of storing Object data is to use Serialization – that is what it is there for. In Most cases implementing Serializable is fairly straight forward. This Site offers a good tutorial on Serialization basics, which can be tailored to the Android environment quite easily.

    By creating a HashMap you can Serialize the HashMap to file for easy retrieval of your data in key/value form. Pretty much all library Collections support Serializable so you can also store other types of Map/List.

    So which to use – Serialization or JSONObject? This really depends on how important efficiency is and how complex the things you want to store are.

    Generally the largest cost in either case is the actual act of writing data to file, so, as JSONObjects will nearly always be smaller and simpler, they may be a little quicker. This is fine for storing Strings or very Simple Objects that can be turned to JSON easily, If you have a very complex class with dozens of members, and many possible states, it may be simpler and as efficient to use Serialization. The actual cost difference between these options in most cases will be negligible and would only really matter if you had to preform reads and writes many many times.

    So use JSON for basic types and serialization for complex types (you can even store a serialized object in a JSON Object!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some information in my database like 'author', 'book' etc., that are all
I have C# application that must store some information into MS SQL that would
I have about twenty pages of information that is stored in tables that needs
I have some information stored as SharedPreferences. I need to access that information from
I need to have some information about the scoping in JavaScript. I know that
I have a need for some kind of information that is in essence static.
Let say that I have a website with some information that could be access
I have some WCF methods that are used to transmit information from a server
I have seen that typing about:somekeywords in browsers address bar gives some information. What
I have this small class called City that simply holds some information about a

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.