in src/main/java/org/apache/rocketmq/exporter/util/JsonUtil.java [114:126]
public static <T> T string2Obj(String str, TypeReference<T> typeReference) {
if (Strings.isNullOrEmpty(str) || typeReference == null) {
return null;
}
str = escapesSpecialChar(str);
try {
return (T) (typeReference.getType().equals(String.class) ? str : objectMapper.readValue(str, typeReference));
} catch (Exception e) {
logger.error("Parse String to Object error\nString: {}\nTypeReference<T>: {}\nError: {}", str,
typeReference.getType(), e);
return null;
}
}