convert java list to json array in java code example
Example: jsonarray to list java
JSONArray data = new JSONArray(); //create data from this -> [{"thumb_url":"tb-1370913834.jpg","event_id":...}]
List list = data.stream().map(o -> (JSONObject) o).collect(Collectors.toList());