Class Serialization


  • public class Serialization
    extends Object
    • Field Detail

      • mapper

        public static com.fasterxml.jackson.databind.ObjectMapper mapper
    • Constructor Detail

      • Serialization

        public Serialization()
    • 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.JsonProcessingException
        IOException
      • write

        public static String write​(Object toWrite)
                            throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • parseQuery

        public static org.gcube.application.geoportal.common.model.rest.QueryRequest parseQuery​(String queryString)
                                                                                         throws IOException
        Throws:
        IOException
      • convert

        public static final <T> T convert​(Object d,
                                          Class<T> clazz)
      • convertAcceptStringAsNull

        public static final <T> T convertAcceptStringAsNull​(Object d,
                                                            Class<T> clazz)
      • asDocument

        public static final org.bson.Document asDocument​(Object obj)
                                                  throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • asDocumentWithId

        public static final org.bson.Document asDocumentWithId​(org.gcube.application.geoportal.common.model.document.Project doc)
                                                        throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException