java jsonString convert 유형 정리
api쪽 개발을 하다보면 json데이터나 다른 파라미터들을 암호화 하기 전이나 평문으로 스트링으로 보내기 위해 컨버트 시켜 주기 위해 작업이 필요 할 떄가 있는데 개발하다가 검색해보며 사용하기 위한 소스를 작성하여 올립니다 만들어 사용하는 VO아니면 Model 을 jsonString로 convert 1 2 3 4 5 public static String convertVoToJsonString(SampleVo sampleVo) throws JsonParseException, JsonParseException, IOException{ ObjectMapper mapper = new ObjectMapper(); String jsonString = mapper.writeValueAsString(sampleVo);..
2021.08.06