Class Serialization
- java.lang.Object
-
- org.gcube.application.geoportal.client.utils.Serialization
-
public class Serialization extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.time.format.DateTimeFormatterFULL_FORMATTERstatic com.fasterxml.jackson.databind.ObjectMappermapper
-
Constructor Summary
Constructors Constructor Description Serialization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.bson.DocumentasDocument(Object obj)static <T> Tconvert(Object d, Class<T> clazz)static <T> Tread(String jsonString, Class<T> clazz)static <T> Iterator<T>readCollection(InputStream is, Class<T> clazz)static <T> Iterator<T>readCollection(String jsonString, Class<T> clazz)static Stringwrite(Object toWrite)
-
-
-
Method Detail
-
read
public static <T> T read(String jsonString, Class<T> clazz) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionIOException
-
readCollection
public static <T> Iterator<T> readCollection(String jsonString, Class<T> clazz) throws IOException
- Throws:
IOException
-
readCollection
public static <T> Iterator<T> readCollection(InputStream is, Class<T> clazz) throws IOException
- Throws:
IOException
-
write
public static String write(Object toWrite) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
asDocument
public static final org.bson.Document asDocument(Object obj) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-