[JAVA] json -> map, map -> json 변환
json -> map 변환 import com.fasterxml.jackson.databind.ObjectMapper; ObjectMapper mapper = new ObjectMapper(); Map map = mapper.readValue(jsonStr, Map.class); map -> json 변환 import com.fasterxml.jackson.databind.ObjectMapper; ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(map); json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(map);