try {
date = sdf.parse((String) jsonObject.get("pub_date"));
} catch (java.text.ParseException ex) {
Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
}
Book book = new Book (Integer.parseInt((String)jsonObject.get("id")),author,(String) jsonObject.get("name"),(String) jsonObject.get("genre"),date);
book.setCount((long) jsonObject.get("count"));
login.getBooks().add(book);
login.getBooks_map().put(book.getId(), book);
}
} catch (ParseException ex) {
Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
}
flag = true;