Code example for Gson

0
        return host;
    } 
     
    private Host cursorToHost(Cursor cursor) {
        String json = cursor.getString(1);
        Gson gson = new Gson();
        try { 
            Host host = gson.fromJson(json, Host.class);
            host.setUpdated(cursor.getString(2));
            return host;
        } 
 
        catch (Exception e) {
            throw new PersistenceException("Could not load starred host details"); 
        } 
    } 
 
    public List<Feedback> getFeedback(int id, String name) {
        Cursor cursor;