If we have String like this
{ "POLICY_URL":"privacy-policy-page",
"LOGIN_URL":"login",
"CONTACT_US_URL":"contact-us-page",
"FAQ_URL":"faqs-page",
"TERMS_AND_CONDITION_URL":"terms-and-condition-page" } and have to convert it to map,
then we can use below code ,
public Map<String, String> convertJsonStringToMap(String stringValueThatWeWantToConvert) {
HashMap<String, Object> map = new HashMap<String, String>();
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(stringValueThatWeWantToConvert, new TypeReference<HashMap<String, String>>() {});
}