java json convert to List
ยท
Languages/JAVA
List blockList = new ArrayList (); String ttt = "{\"list_block\":[\"01011111111\", \"01011112222\"]}"; JsonNode root = new ObjectMapper().readTree(ttt); // ๋ฐฐ์ด์ ์๋ ๊ฐ๋ค ๊ฐ์ ธ์ค๊ธฐ if( root.path("list_block").isArray() ){ Iterator it = root.path("list_block").iterator(); while(it.hasNext()){ blockList.add(it.next().getTextValue()); } }