Android Save object as blob in sqlite

The way I store data as BLOB in my DB, is by converting them to JSON and then storing the bytes. e.g.

ArrayList<Person> persons  = new ArrayList<>();
Gson gson = new Gson();
ContentValues values = new ContentValues();
values.put(MyProvider.KEY_DATA, gson.toJson(persons).getBytes());
// insert or update the DB

And to get the list back

byte[] blob = cursor.getBlob(cursor.getColumnIndex(MyProvider.KEY_DATA));
String json = new String(blob);
Gson gson = new Gson();
ArrayList<Person> persons = gson.fromJson(json, new TypeToken<ArrayList<Person>>()
                                 {}.getType());

Edit: to answer your last question, you should store your data (list of items).