I got this code from a link here, so how do I get this to output from a JSON source URL?
This is the generated code data:
ArrayList<ItemModel> items = new ArrayList<>();
items.add(new ItemModel("10.30", "120/10","80","Tue,31 Oct 17"));
items.add(new ItemModel("10.30", "142/95","95","Tue,31 Oct 17"));
items.add(new ItemModel("15.30", "120/95","200","Tue,31 Oct 17"));
items.add(new ItemModel("20.30", "120/10","80","Tue,29 Oct 17"));
items.add(new ItemModel("10.30", "120/10","50","Tue,29 Oct 17"));
items.add(new ItemModel("10.30", "140/10","80","Tue,28 Oct 17"));
items.add(new ItemModel("10.30", "30/75","40","Tue,28 Oct 17"));
items.add(new ItemModel("10.30", "150/80","70","Tue,28 Oct 17"));
return items;
So, I want that output from a JSON url or Loop in Item.add(new ItemModel)?
Note: if needed, here is the JSON source link