Class Serialization


  • public final class Serialization
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​U>
      T
      convert​(U obj, com.fasterxml.jackson.core.type.TypeReference<T> type)  
      static <T,​U>
      T
      convert​(U obj, java.lang.Class<T> type)  
      static <T> T deserialize​(Response response, com.fasterxml.jackson.core.type.TypeReference<T> type)  
      static <T> T deserialize​(Response response, java.lang.Class<T> type)  
      static <T> T deserialize​(Response response, java.lang.String wrapper, java.lang.Class<T> type)  
      static <T> T deserializeContainer​(Response response, java.lang.Class<?> wrapperType, java.lang.Class<?>... types)  
      static <T> java.util.List<T> deserializeContainer​(Response response, java.lang.Class<T> type)  
      static <T> T deserializeContainer​(Response response, java.lang.String wrapper, com.fasterxml.jackson.databind.JavaType element)  
      static <T> java.util.List<T> deserializeContainer​(Response response, java.lang.String wrapper, java.lang.Class<T> element)  
      static <T> T deserializeContainerSingleItem​(Response response, java.lang.Class<T> element)  
      static java.lang.Void deserializeError​(Response response)  
      static <T> T fromJSON​(java.io.InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> type)  
      static <T> T fromJSON​(java.io.InputStream json, java.lang.Class<T> type)  
      static <T> T fromJSON​(java.io.InputStream json, java.lang.String wrapper, com.fasterxml.jackson.databind.JavaType type)  
      static <T> T fromJSON​(java.lang.String json, java.lang.Class<T> type)  
      static <T> java.util.List<T> fromJSONList​(java.lang.String json, java.lang.Class<T> type)  
      com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()  
      void setObjectMapper​(com.fasterxml.jackson.databind.ObjectMapper mapper)  
      static <T> byte[] toJSON​(T obj)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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

        public static <T> T fromJSON​(java.io.InputStream json,
                                     java.lang.Class<T> type)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • fromJSON

        public static <T> T fromJSON​(java.io.InputStream json,
                                     com.fasterxml.jackson.core.type.TypeReference<T> type)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • fromJSON

        public static <T> T fromJSON​(java.io.InputStream json,
                                     java.lang.String wrapper,
                                     com.fasterxml.jackson.databind.JavaType type)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • fromJSON

        public static <T> T fromJSON​(java.lang.String json,
                                     java.lang.Class<T> type)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • fromJSONList

        public static <T> java.util.List<T> fromJSONList​(java.lang.String json,
                                                         java.lang.Class<T> type)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • convert

        public static <T,​U> T convert​(U obj,
                                            java.lang.Class<T> type)
      • convert

        public static <T,​U> T convert​(U obj,
                                            com.fasterxml.jackson.core.type.TypeReference<T> type)
      • deserializeContainer

        public static <T> java.util.List<T> deserializeContainer​(Response response,
                                                                 java.lang.Class<T> type)
                                                          throws java.io.IOException,
                                                                 StreamException
        Throws:
        java.io.IOException
        StreamException
      • deserializeContainer

        public static <T> T deserializeContainer​(Response response,
                                                 java.lang.Class<?> wrapperType,
                                                 java.lang.Class<?>... types)
                                          throws java.io.IOException,
                                                 StreamException
        Throws:
        java.io.IOException
        StreamException
      • deserializeContainer

        public static <T> java.util.List<T> deserializeContainer​(Response response,
                                                                 java.lang.String wrapper,
                                                                 java.lang.Class<T> element)
                                                          throws java.io.IOException,
                                                                 StreamException
        Throws:
        java.io.IOException
        StreamException
      • deserializeContainerSingleItem

        public static <T> T deserializeContainerSingleItem​(Response response,
                                                           java.lang.Class<T> element)
                                                    throws java.io.IOException,
                                                           StreamException
        Throws:
        java.io.IOException
        StreamException
      • deserializeContainer

        public static <T> T deserializeContainer​(Response response,
                                                 java.lang.String wrapper,
                                                 com.fasterxml.jackson.databind.JavaType element)
                                          throws java.io.IOException,
                                                 StreamException
        Throws:
        java.io.IOException
        StreamException
      • deserialize

        public static <T> T deserialize​(Response response,
                                        java.lang.String wrapper,
                                        java.lang.Class<T> type)
                                 throws java.io.IOException,
                                        StreamException
        Throws:
        java.io.IOException
        StreamException
      • deserialize

        public static <T> T deserialize​(Response response,
                                        com.fasterxml.jackson.core.type.TypeReference<T> type)
                                 throws java.io.IOException,
                                        StreamException
        Throws:
        java.io.IOException
        StreamException