Class SerializationHelper


  • public class SerializationHelper
    extends Object
    Serialization helper class
    • Constructor Detail

      • SerializationHelper

        public SerializationHelper()
    • Method Detail

      • serialize

        public static String serialize​(Object obj)
                                throws Exception
        Serializes the specified object.
        Parameters:
        obj - The object.
        Returns:
        Serialized object.
        Throws:
        Exception
      • deserialize

        public static <T> T deserialize​(String jsonString,
                                        Class<T> returnType)
                                 throws Exception
        Deserializes the specified JSON string.
        Parameters:
        jsonString - The JSON string.
        returnType - Return type.
        Returns:
        Deserialized JSON string.
        Throws:
        Exception