Package io.getstream.core.utils
Class Serialization
java.lang.Object
io.getstream.core.utils.Serialization
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> T convert(U obj, com.fasterxml.jackson.core.type.TypeReference<T> type) static <T,U> T static <T> Tdeserialize(Response response, com.fasterxml.jackson.core.type.TypeReference<T> type) static <T> Tdeserialize(Response response, Class<T> type) static <T> Tdeserialize(Response response, String wrapper, Class<T> type) static <T> TdeserializeContainer(Response response, Class<?> wrapperType, Class<?>... types) static <T> List<T>deserializeContainer(Response response, Class<T> type) static <T> TdeserializeContainer(Response response, String wrapper, com.fasterxml.jackson.databind.JavaType element) static <T> List<T>deserializeContainer(Response response, String wrapper, Class<T> element) static <T> TdeserializeContainerSingleItem(Response response, Class<T> element) static VoiddeserializeError(Response response) static <T> TfromJSON(InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> type) static <T> TfromJSON(InputStream json, Class<T> type) static <T> TfromJSON(InputStream json, String wrapper, com.fasterxml.jackson.databind.JavaType type) static <T> Tstatic <T> List<T>fromJSONList(String json, Class<T> type) com.fasterxml.jackson.databind.ObjectMappervoidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) static <T> byte[]toJSON(T obj)
-
Method Details
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) -
toJSON
public static <T> byte[] toJSON(T obj) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
fromJSON
- Throws:
IOException
-
fromJSON
public static <T> T fromJSON(InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> type) throws IOException - Throws:
IOException
-
fromJSON
public static <T> T fromJSON(InputStream json, String wrapper, com.fasterxml.jackson.databind.JavaType type) throws IOException - Throws:
IOException
-
fromJSON
- Throws:
IOException
-
fromJSONList
- Throws:
IOException
-
convert
-
convert
public static <T,U> T convert(U obj, com.fasterxml.jackson.core.type.TypeReference<T> type) -
deserializeContainer
public static <T> List<T> deserializeContainer(Response response, Class<T> type) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserializeContainer
public static <T> T deserializeContainer(Response response, Class<?> wrapperType, Class<?>... types) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserializeContainer
public static <T> List<T> deserializeContainer(Response response, String wrapper, Class<T> element) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserializeContainerSingleItem
public static <T> T deserializeContainerSingleItem(Response response, Class<T> element) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserializeContainer
public static <T> T deserializeContainer(Response response, String wrapper, com.fasterxml.jackson.databind.JavaType element) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserialize
public static <T> T deserialize(Response response, String wrapper, Class<T> type) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserialize
public static <T> T deserialize(Response response, Class<T> type) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserialize
public static <T> T deserialize(Response response, com.fasterxml.jackson.core.type.TypeReference<T> type) throws IOException, StreamException - Throws:
IOExceptionStreamException
-
deserializeError
- Throws:
IOExceptionStreamException
-