Android - Download JSON data and save to shared preferences

后端 未结 5 1082
遥遥无期
遥遥无期 2021-01-23 19:11

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

5条回答
  •  轮回少年
    2021-01-23 20:07

    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.

提交回复
热议问题