I am storing check boxes title and state as JSON having a JSONArray of JSONObject containing these values.
I tried to store it as two JSONArrrays one for title and one for state, but I am not able to write an algorithm to maintain these with the states as well as removing any one from the list.
It is taking too much lines of code to do it. Making methods to delete elements of array containing boolean and other containing string.
Also we can't use Jsonarray.remove()
method in older apis. So how would you suggest to achieve this efficiently
Note - I can't use sharedPreferences as I am storing multiple rows with this type of data. It is like a checklist maker where we can add or remove list items and can mark it as complete when done.
I want to store in database as well and retrieve them when required, I chose JSON as it can be stored as string and can be parsed into object when required
Aucun commentaire:
Enregistrer un commentaire