I am working on an appengine connected android project. One of my endpoint methods returns a collection
return CollectionResponse.<MyData> builder().setItems(result).build();
When the data reaches android, I want to persist the data to SharedPreferences. This is a two steps process:
- Persist the json representing the response to sharedPreferences
- Unmarshall the json to
CollectionResponseMyData
or at the very leastList<MyData>
Has anyone ever done this and don't mind sharing how?
To clarify, if needed, step 1 occurs when the data arrives. step 2 occurs at some later time when the data is needed.