Reputation: 1077
I'm reading JSON data from a PHP Service and everytime the version of that JSON changes, I want to store it on Android (replace the old data with the new one), the JSON is used only for fill a Spinner.
My question is: - The JSON has 36KB, is OK to store it on Shared Preferences has a String or should I use SQLite to store it?
There will be one update per month
Example of my data : http://zimp.hugo.webe.pt/api/occupations/list
Upvotes: 1
Views: 1505
Reputation: 29199
if its a json String, having many records, values, then I would recommend to parse this string into records, and then save these records to sqlite, so that you wont need to parse this string again, and again, un-necessarily. otherwise, there isn't any issue in saving string into sharedpreferences.
According to your data, you should opt for SQLite.
Upvotes: 3
Reputation: 16152
It's Depend on your data.
Now you have to decide which one you select.
Upvotes: 0
Reputation: 993
Not a problem to save in shared preference..but keep in mind that SP mostly saves primitive data types in key value pair...and not an issue of 36kb in your case.:)
Upvotes: 0