I have this JSON file:
[{"date":"23.2.2004","note":"Foo","title":"Bar"}, {"date":"23.2.2005","note":"Foo1","title":"Bar1"}]
I have this class:
public class Note {
private String title;
private String note;
private String date;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getDate() {
return date;
}
@Override
public String toString() {
return note+"; "+date+";"+title;
}
public String StringDetail() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public Note(String title, String note, String date) {
this.title = title;
this.note = note;
this.date = date;
}
And I want to make an Arraylist entry with this three attributes. I have an Arraylist like this:
ArrayList<Note> arrlist = new ArrayList<>();
and I want to save the data from JSON to this arraylist.