키를 알 수없는 경우 JSON을 String으로 매핑 할 수 있습니까? 여기에 JSON 나는 API 얻을되어 다음과 같이Spring : JSON 키를 알 수 없을 때 JSON을 String으로 매핑
{
"key1.abc": "Some translation",
"key2.abc": "Some other translation",
...
}
내가 시도 :
ResponseEntity<String> responseEntity = restTemplate.exchange(uri, HttpMethod.GET, requestEntity, String.class);
를하지만 오류로 인해 실패 :
JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
어떤 아이디어? 고마워요
왜 당신이 문자열해야합니까를? – rorschach