What do you want to save?
Add Code snippet
New code examples
-
Java 2021-11-18 23:40:13
json array to List in 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()); Add solution -
Java 2021-10-14 03:10:03
JSONObject java
String message; JSONObject json = new JSONObject(); json.put("name", "student"); JSONArray array = new JSONArray(); JSONObject item = new JSONObject(); item.put("information", "test"); item.put("id", 3); ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5