Class NotificationStoreUtils
java.lang.Object
fr.paris.lutece.plugins.notificationstore.web.utils.NotificationStoreUtils
NotificationStoreUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperObjectMapperstatic <T> TjsonToObject(String jsonStr, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) Converts json String response to the desired subclass instance.
-
Method Details
-
getMapper
public static com.fasterxml.jackson.databind.ObjectMapper getMapper()ObjectMapper -
jsonToObject
public static <T> T jsonToObject(String jsonStr, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) throws com.fasterxml.jackson.core.JsonProcessingException Converts json String response to the desired subclass instance.- Parameters:
jsonStr- the json string valuetypeReference-- Returns:
- the desired subclass instance
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingException
-