java json string to array code example
Example 1: objectmapper convert list of objects
List<MyClass> myObjects = mapper.readValue(jsonInput, new TypeReference<List<MyClass>>(){});
Example 2: jsonarray to list java
JSONArray data = new JSONArray(); //create data from this -> [{"thumb_url":"tb-1370913834.jpg","event_id":...}]
List<JSONObject> list = data.stream().map(o -> (JSONObject) o).collect(Collectors.toList());