Class GsonSerializationHelper


  • @Deprecated
    public class GsonSerializationHelper
    extends java.lang.Object
    Deprecated.
    This class should no longer be needed once users upgrade to a recent version of the package that contains the new DynamicModel pattern.
    Utility class to help with serialization in models which extend DynamicModel.
    See Also:
    DynamicModel
    • Method Detail

      • serializeDynamicModelProperty

        public static <T> T serializeDynamicModelProperty​(java.lang.Object property,
                                                          java.lang.reflect.Type type)
        Deprecated.
        Takes a property of an object extending DynamicModel and serializes it to the desired type. Without this conversion, properties which also happen to extend DynamicModel throw an exception when trying to cast to their concrete type from the default Gson serialization.
        Type Parameters:
        T - the generic type
        Parameters:
        property - property of a DynamicModel
        type - the type we wish to convert the property to
        Returns:
        the properly converted object